	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function itd1000_set_vco
_itd1000_set_vco:                       ## @itd1000_set_vco
	.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
	subq	$24, %rsp
	.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, %r12
	movq	_GVBB_I2C@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_itd1000_read_reg
	movl	%eax, %ebx
	orl	$64, %ebx
	movq	_VCO_CHP1_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_itd1000_read_reg
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %esi
	movzbl	%bl, %edx
	movq	%r12, %rdi
	callq	_itd1000_write_reg
	movq	_itd1000_vcorg@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	andl	$15, -44(%rbp)                  ## 4-byte Folded Spill
	movl	$8, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpq	%r13, -8(%rdi,%r14)
	jg	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r14
	cmpq	%rax, %rbx
	jl	LBB0_2
	jmp	LBB0_11
LBB0_3:
	movq	_VCO_CHP1_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi,%r14), %edx
	shll	$4, %edx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	orl	%ebx, %edx
	movq	%r12, %rdi
	callq	_itd1000_write_reg
	movl	$1, %edi
	callq	_msleep
	movq	_PLLLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_itd1000_read_reg
	movl	%eax, %r12d
	andl	$15, %r12d
	movq	(%r15), %rax
	movl	(%rax,%r14), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_itd_dbg
	cmpl	$14, %r12d
	jb	LBB0_6
## %bb.4:
	movq	(%r15), %rax
	movl	(%rax,%r14), %edx
	movl	%edx, %eax
	orl	$8, %eax
	cmpl	$15, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_11
## %bb.5:
	movl	$16, %eax
	jmp	LBB0_9
LBB0_6:
	cmpl	$1, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	ja	LBB0_11
## %bb.7:
	movq	(%r15), %rax
	movl	(%rax,%r14), %edx
	movl	%edx, %eax
	orl	$8, %eax
	cmpl	$9, %eax
	jne	LBB0_8
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$-16, %eax
LBB0_9:
	movq	_VCO_CHP1_I2C@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	shll	$4, %edx
	addl	%eax, %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_itd1000_write_reg              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GVBB_I2C,4,2                   ## @GVBB_I2C
	.comm	_VCO_CHP1_I2C,4,2               ## @VCO_CHP1_I2C
	.comm	_itd1000_vcorg,8,3              ## @itd1000_vcorg
	.comm	_PLLLOCK,4,2                    ## @PLLLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VCO: %dkHz: %d -> ADCOUT: %d %02x\n"

	.no_dead_strip	_itd1000_set_vco
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function itd1000_set_vco
_itd1000_set_vco:                       ; @itd1000_set_vco
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _GVBB_I2C@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GVBB_I2C@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_itd1000_read_reg
	and	w24, w0, #0xff
Lloh2:
	adrp	x23, _VCO_CHP1_I2C@GOTPAGE
Lloh3:
	ldr	x23, [x23, _VCO_CHP1_I2C@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_itd1000_read_reg
	mov	x20, x0
	ldr	w1, [x22]
	orr	w2, w24, #0x40
	mov	x0, x19
	bl	_itd1000_write_reg
Lloh4:
	adrp	x24, _itd1000_vcorg@GOTPAGE
Lloh5:
	ldr	x24, [x24, _itd1000_vcorg@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x22, #0
	and	w20, w20, #0xf
	mov	w25, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	add	x8, x0, x25
	ldur	x8, [x8, #-8]
	cmp	x8, x21
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x25, x25, #16
	cmp	x22, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_9
LBB0_4:
	ldr	w1, [x23]
	ldr	w8, [x0, x25]
	mov	x2, x20
	bfi	w2, w8, #4, #28
	mov	x0, x19
	bl	_itd1000_write_reg
	mov	w0, #1
	bl	_msleep
Lloh6:
	adrp	x8, _PLLLOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PLLLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_itd1000_read_reg
	and	w22, w0, #0xf
	ldr	x8, [x24]
	ldr	w2, [x8, x25]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x3, x22
	mov	x4, x20
	bl	_itd_dbg
	cmp	w22, #14
	b.lo	LBB0_7
; %bb.5:
	ldr	x8, [x24]
	ldr	w8, [x8, x25]
	orr	w9, w8, #0x8
	cmp	w9, #15
	b.eq	LBB0_9
; %bb.6:
	mov	w9, #16
	b	LBB0_11
LBB0_7:
	cmp	w22, #1
	b.hi	LBB0_9
; %bb.8:
	ldr	x8, [x24]
	ldr	w8, [x8, x25]
	orr	w9, w8, #0x8
	cmp	w9, #9
	b.ne	LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w9, #-16
LBB0_11:
	ldr	w1, [x23]
	add	w8, w9, w8, lsl #4
	orr	w2, w8, w20
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_itd1000_write_reg
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GVBB_I2C,4,2                   ; @GVBB_I2C
	.comm	_VCO_CHP1_I2C,4,2               ; @VCO_CHP1_I2C
	.comm	_itd1000_vcorg,8,3              ; @itd1000_vcorg
	.comm	_PLLLOCK,4,2                    ; @PLLLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VCO: %dkHz: %d -> ADCOUT: %d %02x\n"

	.no_dead_strip	_itd1000_set_vco
.subsections_via_symbols
