	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_set_dds
_dib8000_set_dds:                       ## @dib8000_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, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_abs
	movl	%eax, %r12d
	movq	8(%r14), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %r15d
	andl	$33554432, %r15d                ## imm = 0x2000000
	cmpl	$32912, (%r14)                  ## imm = 0x8090
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$23, %esi
	callq	_dib8000_read32
	cltq
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movl	$67108864, %ebx                 ## imm = 0x4000000
	movl	$67108864, %eax                 ## imm = 0x4000000
	xorl	%edx, %edx
	idivl	%ecx
	movl	%eax, %ecx
	imull	%r12d, %eax
	movl	$67108864, %edx                 ## imm = 0x4000000
	subl	%eax, %edx
	testq	%r13, %r13
	cmovnsl	%eax, %edx
	subl	%edx, %ebx
	testl	%r15d, %r15d
	cmovel	%edx, %ebx
	movl	$4, %r13d
	jmp	LBB0_6
LBB0_2:
	andl	$33554431, %ebx                 ## imm = 0x1FFFFFF
	movl	$67108864, %eax                 ## imm = 0x4000000
	xorl	%edx, %edx
	idivl	4(%rcx)
	movl	%eax, %ecx
	negl	%ecx
	testq	%r13, %r13
	cmovnsl	%eax, %ecx
	movl	%ecx, %eax
	imull	%r12d, %eax
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.4:
	addl	%eax, %ebx
	jmp	LBB0_5
LBB0_3:
	subl	%eax, %ebx
LBB0_5:
	movl	$2, %r13d
LBB0_6:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%r15d, %r15d
	movl	$32, %ecx
	movl	$45, %esi
	cmovel	%ecx, %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_dprintk
	movq	8(%r14), %rax
	movl	4(%rax), %eax
	cltd
	idivl	%r13d
	cmpl	%eax, %r12d
	jle	LBB0_8
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	shrl	$25, %r15d
	movq	%r14, %rdi
	movl	$26, %esi
	movl	%r15d, %edx
	callq	_dib8000_write_word
	movl	%ebx, %edx
	shrl	$16, %edx
	andl	$511, %edx                      ## imm = 0x1FF
	movq	%r14, %rdi
	movl	$27, %esi
	callq	_dib8000_write_word
	movzwl	%bx, %edx
	movq	%r14, %rdi
	movl	$28, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dib8000_write_word             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting a DDS frequency offset of %c%dkHz\n"

	.no_dead_strip	_dib8000_set_dds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_set_dds
_dib8000_set_dds:                       ; @dib8000_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	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_abs
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w22, [x8]
	and	w23, w22, #0x2000000
	ldr	w9, [x19]
	mov	w10, #32912
	cmp	w9, w10
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #23
	bl	_dib8000_read32
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #67108864
	sdiv	w8, w9, w8
	mul	w10, w8, w20
	sub	w11, w9, w10
	cmp	x21, #0
	csel	w10, w11, w10, lt
	sub	w9, w9, w10
	cmp	w23, #0
	csel	w21, w10, w9, eq
	mov	w24, #4
	b	LBB0_3
LBB0_2:
	and	w9, w22, #0x1ffffff
	ldr	w8, [x8, #4]
	mov	w10, #67108864
	sdiv	w8, w10, w8
	cmp	x21, #0
	cneg	w8, w8, lt
	mul	w10, w8, w20
	add	w11, w10, w9
	mov	w12, #2
	sub	w9, w9, w10
	mov	w10, #2
	cmp	w23, #0
	csel	w21, w11, w9, eq
	csel	w24, w12, w10, eq
LBB0_3:
	mov	w9, #45
	mov	w10, #32
	cmp	w23, #0
	csel	w1, w10, w9, eq
	sdiv	w2, w21, w8
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	sdiv	w8, w8, w24
	cmp	w20, w8
	b.le	LBB0_5
; %bb.4:
	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
LBB0_5:
	ubfx	w2, w22, #25, #1
	mov	x0, x19
	mov	w1, #26
	bl	_dib8000_write_word
	ubfx	w2, w21, #16, #9
	mov	x0, x19
	mov	w1, #27
	bl	_dib8000_write_word
	and	w2, w21, #0xffff
	mov	x0, x19
	mov	w1, #28
	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
	b	_dib8000_write_word
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting a DDS frequency offset of %c%dkHz\n"

	.no_dead_strip	_dib8000_set_dds
.subsections_via_symbols
