	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8096p_get_best_sampling
_dib8096p_get_best_sampling:            ## @dib8096p_get_best_sampling
	.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, %r12
	movq	$0, (%rsi)
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	$0, 8(%rsi)
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	leaq	L_.str.1(%rip), %rdi
	movl	$1, %ebx
	movl	$1, %esi
	movl	$6, %edx
	xorl	%eax, %eax
	callq	_deb_info
	xorl	%esi, %esi
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movw	$12000, %ax                     ## imm = 0x2EE0
	xorl	%edx, %edx
	movq	%rbx, %r10
	divw	%bx
	movzwl	%ax, %r9d
	movl	$1, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=2
	incl	%r14d
	cmpl	$64, %r14d
	je	LBB0_10
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movl	%r14d, %r8d
	imull	%r9d, %r8d
	leal	-132000(%r8), %eax
	cmpl	$8000, %eax                     ## imm = 0x1F40
	ja	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%r8d, %r11d
	shrl	$3, %r11d
	movslq	(%r12), %r15
	imulq	$274877907, %r15, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	cmpl	%eax, %r11d
	jl	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movslq	4(%r12), %r13
	imull	$1000, %r11d, %ecx              ## imm = 0x3E8
	movl	%r13d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	imulq	$274877907, %r13, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movslq	%r15d, %rdx
	imulq	$274877907, %rdx, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$39, %rdx
	addl	%esi, %edx
	movl	%ecx, %esi
	subl	%edx, %esi
	addl	%ecx, %edx
	leal	-1(%rax), %edi
	movl	%eax, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=3
	incl	%ebx
	incl	%edi
	cmpl	%eax, %edi
	jg	LBB0_16
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%ebx, %ecx
	imull	%r11d, %ecx
	cmpl	%esi, %ecx
	jl	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	cmpl	%edx, %ecx
	jg	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, %esi
	jmp	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%esi, %esi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r10), %eax
	movl	$1, %esi
	cmpl	$5, %r10d
	movl	%eax, %ebx
	jb	LBB0_1
	jmp	LBB0_12
LBB0_16:
	movl	%r8d, %r9d
	shrl	%r9d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, 4(%rcx)
	movq	%r10, %rbx
	movl	%ebx, 8(%rcx)
	movl	$-34087043, %eax                ## imm = 0xFDF7DF7D
	xorl	%edx, %edx
	divl	%r9d
	movl	%eax, %edi
	shll	$8, %edi
	shll	$8, %edx
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%r9d
	movl	%eax, %r10d
	addl	%edi, %r10d
	movl	%r10d, (%rcx)
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movl	$12000, %ecx                    ## imm = 0x2EE0
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r14
	pushq	%rbx
	pushq	%r11
	callq	_deb_info
	addq	$32, %rsp
LBB0_12:
	xorl	%eax, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 4(%rcx)
	jne	LBB0_15
## %bb.13:
	cmpl	$0, 8(%rcx)
	jne	LBB0_15
## %bb.14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bandwidth = %d"

L_.str.1:                               ## @.str.1
	.asciz	"MIN prediv = %d : MAX prediv = %d"

L_.str.2:                               ## @.str.2
	.asciz	"RF %6d; BW %6d; Xtal %6d; Fmem %6d; Fdem %6d; Fs %6d; Prediv %2d; Loopdiv %2d; Timf %8d;"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dib8096p_get_best_sampling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8096p_get_best_sampling
_dib8096p_get_best_sampling:            ; @dib8096p_get_best_sampling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	str	xzr, [x1]
	str	wzr, [x1, #8]
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
	mov	w8, #6
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w21, #1
	mov	w1, #1
	bl	_deb_info
	mov	w0, #0
	mov	w8, #12000
	mov	w9, #64608
	movk	w9, #65533, lsl #16
	mov	w10, #8000
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	mov	w12, #1000
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
	and	w14, w21, #0xffff
	mov	w13, #1
	udiv	w15, w8, w14
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=2
	mov	w0, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	w13, w13, #1
	cmp	w13, #64
	b.eq	LBB0_9
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
	mul	w14, w13, w15
	add	w16, w14, w9
	cmp	w16, w10
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	lsr	w17, w14, #3
	ldrsw	x16, [x20]
	mul	x1, x16, x11
	lsr	x2, x1, #63
	asr	x1, x1, #38
	add	w1, w1, w2
	cmp	w17, w1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	ldrsw	x1, [x20, #4]
	mul	w0, w17, w12
	sdiv	w0, w1, w0
	mul	x2, x1, x11
	lsr	x3, x2, #63
	asr	x2, x2, #38
	add	w3, w2, w3
	smull	x2, w16, w11
	lsr	x4, x2, #63
	asr	x2, x2, #39
	add	w4, w2, w4
	sub	w2, w3, w4
	add	w3, w3, w4
	sub	w4, w0, #1
	mov	x5, x0
LBB0_7:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mul	w6, w5, w17
	cmp	w6, w2
	ccmp	w6, w3, #0, ge
	b.le	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	add	w5, w5, #1
	add	w4, w4, #1
	cmp	w4, w0
	b.le	LBB0_7
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	add	w13, w21, #1
	mov	w0, #1
	cmp	w21, #5
	mov	x21, x13
	b.lo	LBB0_1
	b	LBB0_12
LBB0_11:
	lsr	w8, w14, #1
	stp	w13, w21, [x19, #4]
	mov	w9, #57213
	movk	w9, #65015, lsl #16
	udiv	w10, w9, w8
	msub	w9, w10, w8, w9
	lsl	w9, w9, #8
	udiv	w9, w9, w8
	add	w9, w9, w10, lsl #8
	str	w9, [x19]
	stp	x13, x9, [sp, #48]
	stp	x17, x21, [sp, #32]
	stp	x14, x8, [sp, #16]
	mov	w8, #12000
                                        ; kill: def $w16 killed $w16 killed $x16 def $x16
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	stp	x16, x8, [sp]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_deb_info
LBB0_12:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_14
; %bb.13:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_16
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bandwidth = %d"

l_.str.1:                               ; @.str.1
	.asciz	"MIN prediv = %d : MAX prediv = %d"

l_.str.2:                               ; @.str.2
	.asciz	"RF %6d; BW %6d; Xtal %6d; Fmem %6d; Fdem %6d; Fs %6d; Prediv %2d; Loopdiv %2d; Timf %8d;"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_dib8096p_get_best_sampling
.subsections_via_symbols
