	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dscc4_set_clock
_dscc4_set_clock:                       ## @dscc4_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_dscc4_priv
	movq	_Ccr0ClockMask@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%r15)
	movq	%rax, %r13
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	je	LBB0_12
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movl	(%rax), %r14d
	movl	$-1, %r12d
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.2:
	movl	(%r13), %edi
	callq	_dscc4_check_clock_ability
	testq	%rax, %rax
	js	LBB0_13
## %bb.3:
	movl	%r14d, %r8d
	movl	%r14d, %eax
	cltd
	idivl	(%rbx)
	movq	_BRR_DIVIDER_MAX@GOTPCREL(%rip), %rcx
	movl	%eax, %esi
	sarl	$4, %esi
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	setg	%dl
	cmovlel	%eax, %esi
	xorl	$55, %edx
	orl	(%r15), %edx
	movl	%edx, (%r15)
	cmpl	$4194303, %esi                  ## imm = 0x3FFFFF
	ja	LBB0_4
## %bb.5:
	xorl	%ecx, %ecx
	testl	%esi, %esi
	je	LBB0_6
## %bb.7:
	cmpl	$64, %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_9
## %bb.8:
	movl	%esi, %eax
	jmp	LBB0_11
LBB0_4:
	movl	$15, %ecx
	movl	$63, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_6:
	xorl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_9:
	xorl	%ecx, %ecx
	movl	%esi, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	sarl	%eax
	cmpl	$127, %esi
	movl	%eax, %esi
	ja	LBB0_10
LBB0_11:
	movl	%ecx, %edi
	shll	$8, %edi
	orl	%eax, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	testb	$1, %dl
	cmovnel	%eax, %ecx
	movl	%r8d, %eax
	cltd
	idivl	%ecx
	movl	%eax, (%rbx)
LBB0_12:
	movq	_BRR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_scc_writel
	xorl	%r12d, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Ccr0ClockMask,4,2              ## @Ccr0ClockMask
	.comm	_BRR_DIVIDER_MAX,4,2            ## @BRR_DIVIDER_MAX
	.comm	_BRR,4,2                        ## @BRR
	.no_dead_strip	_dscc4_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dscc4_set_clock
_dscc4_set_clock:                       ; @dscc4_set_clock
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_dscc4_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _Ccr0ClockMask@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Ccr0ClockMask@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x22]
	bic	w8, w9, w8
	str	w8, [x22]
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w23, [x8]
	cbz	w23, LBB0_7
; %bb.2:
	ldr	w0, [x20]
	bl	_dscc4_check_clock_ability
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w8, [x21]
	sdiv	w8, w23, w8
Lloh3:
	adrp	x9, _BRR_DIVIDER_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BRR_DIVIDER_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w10, w8, #4
	mov	w11, #54
	cmp	w8, w9
	csel	w9, w10, w8, gt
	cinc	w8, w11, le
	ldr	w10, [x22]
	orr	w8, w10, w8
	str	w8, [x22]
	lsr	w10, w9, #22
	cbnz	w10, LBB0_9
; %bb.4:
	cbz	w9, LBB0_6
; %bb.5:
	cmp	w9, #64
	b.hs	LBB0_10
LBB0_6:
	mov	w10, #0
	b	LBB0_12
LBB0_7:
	mov	w0, #-1
	b	LBB0_14
LBB0_8:
	mov	w0, #0
	b	LBB0_13
LBB0_9:
	mov	w10, #15
	mov	w9, #63
	b	LBB0_12
LBB0_10:
	mov	w10, #0
	mov	x11, x9
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w10, #1
	asr	w9, w11, #1
	cmp	w11, #127
	mov	x11, x9
	b.hi	LBB0_11
LBB0_12:
	orr	w0, w9, w10, lsl #8
	lsl	w9, w9, w10
	lsl	w10, w9, #4
	tst	w8, #0x1
	csel	w8, w10, w9, eq
	sdiv	w8, w23, w8
	str	w8, [x21]
LBB0_13:
Lloh6:
	adrp	x8, _BRR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BRR@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x1, x20
	mov	x2, x19
	bl	_scc_writel
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_Ccr0ClockMask,4,2              ; @Ccr0ClockMask
	.comm	_BRR_DIVIDER_MAX,4,2            ; @BRR_DIVIDER_MAX
	.comm	_BRR,4,2                        ; @BRR
	.no_dead_strip	_dscc4_set_clock
.subsections_via_symbols
