	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sii902x_select_mclk_div
_sii902x_select_mclk_div:               ## @sii902x_select_mclk_div
	.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
	movl	%edx, %eax
	movq	%rdi, %rbx
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r13d
	movq	_sii902x_mclk_div_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movl	$100000, %ebx                   ## imm = 0x186A0
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r13d
	movl	%edx, %eax
	movl	$0, %ecx
	cmovel	%ecx, %eax
	cmpl	%ebx, %edx
	cmovbl	%eax, %ebx
	incq	%r14
	callq	_ARRAY_SIZE
	movq	%r12, %rcx
	cmpq	%rax, %r14
	jae	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movl	(%rdi,%r14,4), %eax
	movl	%r13d, %esi
	subl	%eax, %esi
	movl	%esi, %edx
	negl	%edx
	cmovsl	%esi, %edx
	movq	%r14, %r12
	cmpl	%ebx, %edx
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %r12
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r13d
	jne	LBB0_7
	jmp	LBB0_8
LBB0_1:
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r12, %rax
	shlq	$4, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	orq	%rax, (%rcx)
	movq	(%r15), %rax
	movl	(%rax,%r12,4), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sii902x_mclk_div_table,8,3     ## @sii902x_mclk_div_table
	.no_dead_strip	_sii902x_select_mclk_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sii902x_select_mclk_div
_sii902x_select_mclk_div:               ; @sii902x_select_mclk_div
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _sii902x_mclk_div_table@GOTPAGE
Lloh1:
	ldr	x22, [x22, _sii902x_mclk_div_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	mov	x23, #0
	cbz	x0, LBB0_4
; %bb.1:
	mov	x24, #0
	mov	w25, #34464
	movk	w25, #1, lsl #16
	udiv	w20, w20, w21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w9, [x0, x24, lsl #2]
	subs	w8, w20, w9
	cneg	w8, w8, mi
	cmp	w8, w25
	csel	x23, x24, x23, lo
	ccmp	w20, w9, #0, lo
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w20, w9
	csel	w9, wzr, w8, eq
	cmp	w8, w25
	csel	w25, w9, w25, lo
	add	x24, x24, #1
	bl	_ARRAY_SIZE
	cmp	x24, x0
	b.lo	LBB0_2
LBB0_4:
	ldr	x8, [x19]
	orr	x8, x8, x23, lsl #4
	str	x8, [x19]
	ldr	x8, [x22]
	ldr	w0, [x8, x23, lsl #2]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_sii902x_mclk_div_table,8,3     ; @sii902x_mclk_div_table
	.no_dead_strip	_sii902x_select_mclk_div
.subsections_via_symbols
