	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7090p_get_best_sampling
_dib7090p_get_best_sampling:            ## @dib7090p_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsi)
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movl	$69500, %edx                    ## imm = 0x10F7C
	xorl	%eax, %eax
	callq	_deb_info
	leaq	L_.str.1(%rip), %rdi
	movl	$1, %esi
	movl	$6, %edx
	xorl	%eax, %eax
	callq	_deb_info
	movl	$2, %r8d
	xorl	%ecx, %ecx
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
	divw	%r8w
	movzwl	%ax, %r9d
	movl	$1, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=2
	incl	%esi
	cmpl	$64, %esi
	je	LBB0_10
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movl	%esi, %r11d
	imull	%r9d, %r11d
	leal	-69500(%r11), %eax
	cmpl	$6500, %eax                     ## imm = 0x1964
	ja	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%r11d, %r12d
	shrl	$2, %r12d
	movslq	(%r15), %r10
	imulq	$274877907, %r10, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	cmpl	%eax, %r12d
	jl	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movslq	4(%r15), %rcx
	imull	$1000, %r12d, %edi              ## imm = 0x3E8
	movl	%ecx, %eax
	cltd
	idivl	%edi
                                        ## kill: def $eax killed $eax def $rax
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movslq	%r10d, %rdx
	imulq	$274877907, %rdx, %r10          ## imm = 0x10624DD3
	movq	%r10, %rdx
	shrq	$63, %rdx
	sarq	$39, %r10
	addl	%edx, %r10d
	movl	%ecx, %edx
	subl	%r10d, %edx
	addl	%ecx, %r10d
	leal	-1(%rax), %ebx
	movl	%eax, %ecx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=3
	incl	%ecx
	incl	%ebx
	cmpl	%eax, %ebx
	jg	LBB0_12
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%ecx, %edi
	imull	%r12d, %edi
	cmpl	%edx, %edi
	jl	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	cmpl	%r10d, %edi
	jg	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, %ecx
	jmp	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r8), %eax
	movl	$1, %ecx
	cmpl	$5, %r8d
	movl	%eax, %r8d
	jb	LBB0_1
	jmp	LBB0_16
LBB0_12:
	movl	%esi, (%r14)
	movl	%r8d, 4(%r14)
	movl	$-1898222153, %eax              ## imm = 0x8EDB6DB7
	xorl	%edx, %edx
	divl	%r11d
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%r11d, %edi
	shlq	$9, %rcx
	shlq	$9, %rax
	movabsq	$2194728288256, %rdx            ## imm = 0x1FF00000000
	testq	%rdx, %rax
	je	LBB0_13
## %bb.14:
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_15
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
LBB0_15:
	addq	%rax, %rcx
	movq	%rcx, 8(%r14)
	leaq	L_.str.2(%rip), %rdi
	movl	%r8d, %edx
	xorl	%eax, %eax
	callq	_deb_info
LBB0_16:
	xorl	%eax, %eax
	cmpl	$0, (%r14)
	jne	LBB0_19
## %bb.17:
	cmpl	$0, 4(%r14)
	jne	LBB0_19
## %bb.18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bandwidth = %d fdem_min =%d"

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

L_.str.2:                               ## @.str.2
	.asciz	"loopdiv=%i prediv=%i timf=%i"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dib7090p_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 dib7090p_get_best_sampling
_dib7090p_get_best_sampling:            ; @dib7090p_get_best_sampling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	stp	xzr, xzr, [x1]
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #3964
	movk	w2, #1, lsl #16
	bl	_deb_info
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #1
	mov	w2, #6
	bl	_deb_info
	mov	w15, #0
	mov	w2, #2
	mov	w8, #12000
	mov	w9, #61572
	movk	w9, #65534, lsl #16
	mov	w10, #6500
	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	w13, w2, #0xffff
	mov	w1, #1
	udiv	w13, w8, w13
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=2
	mov	w15, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	w1, w1, #1
	cmp	w1, #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, w1, w13
	add	w16, w14, w9
	cmp	w16, w10
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	lsr	w16, w14, #2
	ldrsw	x17, [x20]
	mul	x0, x17, x11
	lsr	x3, x0, #63
	asr	x0, x0, #38
	add	w0, w0, w3
	cmp	w16, w0
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	ldrsw	x0, [x20, #4]
	mul	w15, w16, w12
	sdiv	w15, w0, w15
	mul	x0, x0, x11
	lsr	x3, x0, #63
	asr	x0, x0, #38
	add	w0, w0, w3
	smull	x17, w17, w11
	lsr	x3, x17, #63
	asr	x17, x17, #39
	add	w3, w17, w3
	sub	w17, w0, w3
	add	w0, w0, w3
	sub	w3, w15, #1
	mov	x4, x15
LBB0_7:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mul	w5, w4, w16
	cmp	w5, w17
	ccmp	w5, w0, #0, ge
	b.le	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	add	w4, w4, #1
	add	w3, w3, #1
	cmp	w3, w15
	b.le	LBB0_7
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbz	w15, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	add	w13, w2, #1
	mov	w15, #1
	cmp	w2, #5
	mov	x2, x13
	b.lo	LBB0_1
	b	LBB0_12
LBB0_11:
	stp	w1, w2, [x19]
	mov	w8, #28087
	movk	w8, #36571, lsl #16
	udiv	w9, w8, w14
	msub	w8, w9, w14, w8
	lsl	x8, x8, #9
	udiv	x8, x8, x14
	add	x8, x8, x9, lsl #9
	str	x8, [x19, #8]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_deb_info
LBB0_12:
	ldr	w8, [x19]
	cbnz	w8, LBB0_14
; %bb.13:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_16
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	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 fdem_min =%d"

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

l_.str.2:                               ; @.str.2
	.asciz	"loopdiv=%i prediv=%i timf=%i"

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