	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7000p_set_dds
_dib7000p_set_dds:                      ## @dib7000p_set_dds
	.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	%rsi, %r12
	movq	%rdi, %rbx
	callq	_dib7000p_get_internal_freq
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_abs
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rcx
	movl	(%rcx), %r15d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	andl	$33554432, %r15d                ## imm = 0x2000000
	movl	%r15d, %ecx
	shrl	$25, %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %r14d
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_dprintk
	movl	%r13d, %ecx
	shrl	$31, %ecx
	addl	%r13d, %ecx
	sarl	%ecx
	xorl	%eax, %eax
	cmpl	%ecx, %r14d
	jg	LBB0_4
## %bb.3:
	movl	$67108864, %eax                 ## imm = 0x4000000
	xorl	%edx, %edx
	idivl	%r13d
	movl	%eax, %ecx
	negl	%ecx
	testq	%r12, %r12
	cmovnsl	%eax, %ecx
	imull	%r14d, %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	$33554431, %eax                 ## imm = 0x1FFFFFF
	movq	%rbx, %r12
	movl	%ecx, %ebx
	negl	%ebx
	testl	%r15d, %r15d
	cmovel	%ecx, %ebx
	addl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$16, %eax
	andl	$511, %eax                      ## imm = 0x1FF
	shrl	$16, %r15d
	orl	%eax, %r15d
	movq	%r12, %rdi
	movl	$21, %esi
	movl	%r15d, %edx
	callq	_dib7000p_write_word
	movzwl	%bx, %edx
	movq	%r12, %rdi
	movl	$22, %esi
	callq	_dib7000p_write_word
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movl	$-1, %eax
LBB0_4:
	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	"DIB7000P: dib7000p_get_internal_freq returned 0\n"

L_.str.1:                               ## @.str.1
	.asciz	"setting a frequency offset of %dkHz internal freq = %d invert = %d\n"

	.no_dead_strip	_dib7000p_set_dds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib7000p_set_dds
_dib7000p_set_dds:                      ; @dib7000p_set_dds
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_dib7000p_get_internal_freq
	mov	x21, x0
	mov	x0, x20
	bl	_abs
	cbz	w21, LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	x8, [x19]
	ldr	w24, [x8]
	and	w23, w24, #0x2000000
	lsr	w3, w23, #25
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_dprintk
	cmp	w21, #0
	cinc	w8, w21, lt
	cmp	w22, w8, asr #1
	b.gt	LBB0_3
; %bb.2:
	mov	w8, #67108864
	sdiv	w8, w8, w21
	cmp	x20, #0
	cneg	w8, w8, lt
	mul	w8, w8, w22
	and	w9, w24, #0x1ffffff
	cmp	w23, #0
	cneg	w8, w8, ne
	add	w20, w8, w9
	ubfx	w8, w20, #16, #9
	orr	w2, w8, w23, lsr #16
	mov	x0, x19
	mov	w1, #21
	bl	_dib7000p_write_word
	and	w2, w20, #0xffff
	mov	x0, x19
	mov	w1, #22
	bl	_dib7000p_write_word
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DIB7000P: dib7000p_get_internal_freq returned 0\n"

l_.str.1:                               ; @.str.1
	.asciz	"setting a frequency offset of %dkHz internal freq = %d invert = %d\n"

	.no_dead_strip	_dib7000p_set_dds
.subsections_via_symbols
