	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mmcif_clk_setup
_sh_mmcif_clk_setup:                    ## @sh_mmcif_clk_setup
	.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	%rdi, %r15
	callq	_sh_mmcif_host_to_dev
	movq	%rax, %r14
	movq	8(%r15), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.1:
	xorl	%r13d, %r13d
	cmpl	$3, %r12d
	jb	LBB0_6
## %bb.2:
	movl	%r12d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %ebx
	movl	16(%r15), %edi
	movl	%r13d, %esi
	shrl	%esi
	callq	_clk_round_rate
	movl	%eax, %r13d
	cmpl	%ebx, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$2, %r13d
	ja	LBB0_3
LBB0_5:
	movq	8(%r15), %rax
LBB0_6:
	movl	$1023, (%r15)                   ## imm = 0x3FF
	shrl	%r12d
	movl	%r12d, (%rax)
	movl	$1023, %edi                     ## imm = 0x3FF
	callq	_fls
	movl	%eax, %ecx
	shrl	%cl, %r13d
	movq	8(%r15), %rax
	movl	%r13d, 4(%rax)
	movl	(%rax), %edx
	jmp	LBB0_8
LBB0_7:
	movl	16(%r15), %edi
	callq	_clk_get_rate
	movl	%eax, %r13d
	movl	%eax, %edx
	shrl	%edx
	movq	8(%r15), %rax
	movl	%edx, (%rax)
	shrl	$9, %r13d
	movl	%r13d, 4(%rax)
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clk max/min = %d/%d\n"

	.no_dead_strip	_sh_mmcif_clk_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mmcif_clk_setup
_sh_mmcif_clk_setup:                    ; @sh_mmcif_clk_setup
	.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	x20, x0
	bl	_sh_mmcif_host_to_dev
	mov	x19, x0
	ldr	x8, [x20, #8]
	ldr	w22, [x8]
	cbz	w22, LBB0_5
; %bb.1:
	cmp	w22, #3
	b.lo	LBB0_6
; %bb.2:
	mov	x21, x22
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x21
	ldr	w0, [x20, #16]
	lsr	w1, w21, #1
	bl	_clk_round_rate
	mov	x21, x0
	cmp	w0, w23
	ccmp	w0, #2, #0, ne
	b.hi	LBB0_3
; %bb.4:
	ldr	x8, [x20, #8]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20, #16]
	bl	_clk_get_rate
	lsr	w2, w0, #1
	ldr	x8, [x20, #8]
	lsr	w3, w0, #9
	stp	w2, w3, [x8]
	b	LBB0_8
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	w9, #1023
	str	w9, [x20]
	lsr	w9, w22, #1
	str	w9, [x8]
	mov	w0, #1023
	bl	_fls
	lsr	w3, w21, w0
	ldr	x8, [x20, #8]
	str	w3, [x8, #4]
	ldr	w2, [x8]
LBB0_8:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_dev_dbg
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clk max/min = %d/%d\n"

	.no_dead_strip	_sh_mmcif_clk_setup
.subsections_via_symbols
