	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_s3c_get_max_clk
_sdhci_s3c_get_max_clk:                 ## @sdhci_s3c_get_max_clk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_to_s3c
	movq	_MAX_BUS_CLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	jle	LBB0_7
## %bb.1:
	movq	(%rax), %rdx
	leaq	-1(%rsi), %rax
	movl	%esi, %r8d
	andl	$3, %r8d
	cmpq	$3, %rax
	jae	LBB0_8
## %bb.2:
	xorl	%edi, %edi
	xorl	%eax, %eax
LBB0_3:
	testq	%r8, %r8
	je	LBB0_6
## %bb.4:
	leaq	(%rdx,%rdi,8), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovaq	%rcx, %rax
	incq	%rsi
	cmpq	%rsi, %r8
	jne	LBB0_5
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_8:
	andl	$-4, %esi
	xorl	%edi, %edi
	xorl	%eax, %eax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	addq	$4, %rdi
	cmpq	%rdi, %rsi
	je	LBB0_3
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rdi,8), %rcx
	cmpq	%rax, %rcx
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rcx
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rdx,%rdi,8), %rax
	cmpq	%rcx, %rax
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rcx, %rax
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	16(%rdx,%rdi,8), %rcx
	cmpq	%rax, %rcx
	ja	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rcx
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%rdx,%rdi,8), %rax
	cmpq	%rcx, %rax
	ja	LBB0_9
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rcx, %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BUS_CLK,4,2                ## @MAX_BUS_CLK
	.no_dead_strip	_sdhci_s3c_get_max_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_s3c_get_max_clk
_sdhci_s3c_get_max_clk:                 ; @sdhci_s3c_get_max_clk
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_to_s3c
Lloh0:
	adrp	x8, _MAX_BUS_CLK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_BUS_CLK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x0]
	cmp	w8, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	x0, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	and	x10, x8, #0xfffffff8
	add	x11, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v3, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v1, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	cmhi.2d	v16, v4, v0
	bit.16b	v0, v4, v16
	cmhi.2d	v4, v5, v3
	bit.16b	v3, v5, v4
	cmhi.2d	v4, v6, v2
	bit.16b	v2, v6, v4
	cmhi.2d	v4, v7, v1
	bit.16b	v1, v7, v4
	subs	x12, x12, #8
	b.ne	LBB0_5
; %bb.6:
	cmhi.2d	v4, v0, v3
	bif.16b	v0, v3, v4
	cmhi.2d	v3, v0, v2
	bif.16b	v0, v2, v3
	cmhi.2d	v2, v0, v1
	bif.16b	v0, v1, v2
	ext.16b	v1, v0, v0, #8
	cmhi	d2, d0, d1
	bif.8b	v0, v1, v2
	fmov	x0, d0
	cmp	x10, x8
	b.eq	LBB0_9
LBB0_7:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	cmp	x10, x0
	csel	x0, x10, x0, hi
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BUS_CLK,4,2                ; @MAX_BUS_CLK
	.no_dead_strip	_sdhci_s3c_get_max_clk
.subsections_via_symbols
