	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib0090_get_wbd_target         ## -- Begin function dib0090_get_wbd_target
	.p2align	4, 0x90
_dib0090_get_wbd_target:                ## @dib0090_get_wbd_target
	.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), %r14
	movq	32(%r14), %rax
	movslq	(%rax), %rax
	imulq	$1125899907, %rax, %r12         ## imm = 0x431BDE83
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$50, %r12
	addl	%eax, %r12d
	movl	(%r14), %r15d
	movq	24(%r14), %rbx
	addq	$-28, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%rbx), %esi
	addq	$32, %rbx
	cmpl	%esi, %r12d
	jg	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movl	$-57345, %eax                   ## imm = 0xFFFF1FFF
	andl	4(%r14), %eax
	movl	(%rbx), %ecx
	movl	%ecx, %esi
	shll	$13, %esi
	testl	%ecx, %ecx
	movl	$32768, %edx                    ## imm = 0x8000
	cmovnel	%esi, %edx
	orl	%eax, %edx
	movl	%edx, 4(%r14)
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovgl	%r15d, %eax
	cmpl	$128, %eax
	movl	$128, %r13d
	cmovbl	%eax, %r13d
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_dib0090_write_reg
	movl	20(%rbx), %eax
	imull	%r12d, %eax
	sarl	$6, %eax
	movl	4(%rbx), %r15d
	movl	8(%rbx), %ecx
	imull	12(%rbx), %r12d
	sarl	$6, %r12d
	subl	%r12d, %ecx
	addl	%ecx, %eax
	subl	%eax, %r15d
	imull	%r13d, %r15d
	sarl	$7, %r15d
	addl	%ecx, %r15d
	movl	8(%r14), %esi
	addl	%r15d, %esi
	movq	%r14, %rdi
	callq	_dib0090_wbd_to_db
	movq	%rax, 16(%r14)
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_dprintk
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_dprintk
	addl	8(%r14), %r15d
	movl	%r15d, %eax
	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	"using wbd-table-entry with max freq %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"wbd-target: %d dB\n"

L_.str.2:                               ## @.str.2
	.asciz	"wbd offset applied is %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib0090_get_wbd_target         ; -- Begin function dib0090_get_wbd_target
	.p2align	2
_dib0090_get_wbd_target:                ; @dib0090_get_wbd_target
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x19, [x0]
	ldp	x9, x8, [x19, #24]
	ldrsw	x8, [x8]
	mov	w10, #56963
	movk	w10, #17179, lsl #16
	mul	x8, x8, x10
	lsr	x10, x8, #32
	lsr	x8, x8, #63
	add	w20, w8, w10, asr #18
	ldr	w22, [x19]
	sub	x21, x9, #8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21, #8]
	add	x21, x21, #32
	cmp	w20, w1
	b.gt	LBB0_1
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldr	w8, [x19, #4]
	and	w8, w8, #0xffff1fff
	ldur	w9, [x21, #-20]
	lsl	w10, w9, #13
	mov	w11, #32768
	cmp	w9, #0
	csel	w9, w11, w10, eq
	orr	w2, w9, w8
	str	w2, [x19, #4]
	cmp	w22, #0
	csel	w8, w22, wzr, gt
	mov	w9, #128
	cmp	w8, #128
	csel	w22, w8, w9, lo
	mov	x0, x19
	mov	w1, #16
	bl	_dib0090_write_reg
	ldr	w8, [x21]
	mul	w8, w20, w8
	ldp	w9, w10, [x21, #-16]
	ldur	w11, [x21, #-8]
	mul	w11, w20, w11
	sub	w10, w10, w11, asr #6
	add	w8, w10, w8, asr #6
	sub	w8, w9, w8
	mul	w8, w8, w22
	add	w20, w10, w8, asr #7
	ldr	w8, [x19, #8]
	add	w1, w20, w8
	mov	x0, x19
	bl	_dib0090_wbd_to_db
	mov	x1, x0
	str	x0, [x19, #16]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dprintk
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_dprintk
	ldr	w8, [x19, #8]
	add	w0, w20, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using wbd-table-entry with max freq %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"wbd-target: %d dB\n"

l_.str.2:                               ; @.str.2
	.asciz	"wbd offset applied is %d\n"

.subsections_via_symbols
