	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_best_clock
_find_best_clock:                       ## @find_best_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r8
	movl	%edi, %r13d
	movl	$-1, -44(%rbp)
	movq	_ixp4xx_timer_freq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	$1024, %eax                     ## imm = 0x400
	jl	LBB0_2
## %bb.1:
	movq	%rbx, (%rsp)
	leaq	-44(%rbp), %r9
	movl	%r13d, %edi
	movl	$1023, %esi                     ## imm = 0x3FF
	jmp	LBB0_4
LBB0_2:
	testl	%eax, %eax
	cmovel	%ecx, %r13d
	movl	$1, %r12d
	cmovnel	%eax, %r12d
	movl	%r13d, %r15d
	imull	%r12d, %r15d
	cmpl	%ecx, %r15d
	jne	LBB0_7
## %bb.3:
	decl	%r12d
	movq	%rbx, (%rsp)
	leaq	-44(%rbp), %r9
	movl	%r13d, %edi
	movl	%r12d, %esi
LBB0_4:
	movl	$1, %edx
	movl	$1, %ecx
LBB0_5:
	callq	_check_clock
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	%r13d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1024, %ebx                     ## imm = 0x400
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_ixp4xx_timer_freq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subl	%r15d, %esi
	movl	%r14d, %edi
	callq	_do_div
	cmpl	$4096, %r14d                    ## imm = 0x1000
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	leal	-1(%r14), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	leaq	-44(%rbp), %r9
	callq	_check_clock
	testl	%eax, %eax
	je	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	leaq	-44(%rbp), %r9
	callq	_check_clock
	addl	%r13d, %r14d
	incl	%ebx
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_6
LBB0_12:
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.13:
	leal	-1(%r12), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	leaq	-44(%rbp), %r9
	movl	%r13d, %edi
	movl	$1, %edx
	movl	$1, %ecx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_check_clock
	testl	%eax, %eax
	je	LBB0_6
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	leaq	-44(%rbp), %r9
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	$4095, %ecx                     ## imm = 0xFFF
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ixp4xx_timer_freq,4,2          ## @ixp4xx_timer_freq
	.no_dead_strip	_find_best_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_best_clock
_find_best_clock:                       ; @find_best_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x20, x1
	mov	w8, #-1
	str	w8, [sp, #12]
Lloh0:
	adrp	x25, _ixp4xx_timer_freq@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ixp4xx_timer_freq@GOTPAGEOFF]
	ldr	w8, [x25]
	sdiv	w9, w8, w0
	cmp	w9, #1024
	b.lt	LBB0_2
; %bb.1:
	add	x5, sp, #12
	mov	w1, #1023
	b	LBB0_4
LBB0_2:
	cmp	w9, #0
	csel	w21, w8, w0, eq
	csinc	w22, w9, wzr, ne
	mul	w26, w21, w22
	cmp	w26, w8
	b.ne	LBB0_7
; %bb.3:
	sub	w1, w22, #1
	add	x5, sp, #12
	mov	x0, x21
LBB0_4:
	mov	w2, #1
	mov	w3, #1
LBB0_5:
	mov	x4, x20
	mov	x6, x19
	bl	_check_clock
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	mov	w23, #0
	mov	x24, x21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, #1024
	b.eq	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x25]
	sub	w1, w8, w26
	mov	x0, x24
	bl	_do_div
	cmp	w24, #1, lsl #12                ; =4096
	b.ge	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	sub	w3, w24, #1
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	x4, x20
	mov	x6, x19
	bl	_check_clock
	cbz	w0, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x4, x20
	mov	x6, x19
	bl	_check_clock
	add	w24, w24, w21
	add	w23, w23, #1
	cbnz	w0, LBB0_8
	b	LBB0_6
LBB0_12:
	cbnz	w23, LBB0_14
; %bb.13:
	sub	w1, w22, #1
	add	x5, sp, #12
	mov	x0, x21
	mov	w2, #1
	mov	w3, #1
	mov	x4, x20
	mov	x6, x19
	bl	_check_clock
	cbz	w0, LBB0_6
LBB0_14:
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	w3, #4095
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ixp4xx_timer_freq,4,2          ; @ixp4xx_timer_freq
	.no_dead_strip	_find_best_clock
.subsections_via_symbols
