	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_adc_phase
_cpcap_adc_phase:                       ## @cpcap_adc_phase
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	16(%rdi), %r10
	movl	(%rdi), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.6:
	movslq	4(%rdi), %r9
	leaq	(%r9,%r9,4), %rcx
	movslq	32(%r10,%rcx,8), %rdx
	movq	8(%rdi), %rax
	movq	_CPCAP_FOUR_POINT_TWO_ADC@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %r8
	addq	%r8, %rdx
	subq	%rdx, %rax
	imulq	(%r10,%rcx,8), %rax
	movq	%rax, 8(%rdi)
	movq	8(%r10,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.7:
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_8
## %bb.9:
	cqto
	idivq	%rcx
	addq	%r8, %rax
	jmp	LBB0_13
LBB0_1:
	movq	24(%rdi), %rcx
	cmpl	$130, %eax
	jne	LBB0_3
## %bb.2:
	movl	4(%rdi), %eax
LBB0_3:
	movslq	%eax, %r9
	movslq	4(%rcx,%r9,8), %rdx
	addq	8(%rdi), %rdx
	movslq	(%rcx,%r9,8), %rax
	addq	%rdx, %rax
	leaq	(%r9,%r9,4), %r8
	imulq	(%r10,%r8,8), %rax
	movq	%rax, 8(%rdi)
	movq	8(%r10,%r8,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.4:
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.11:
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	jmp	LBB0_12
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	addq	%r8, %rax
	jmp	LBB0_13
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edx
LBB0_12:
	movslq	32(%r10,%r8,8), %rax
	addq	%rdx, %rax
LBB0_13:
	movq	%rax, 8(%rdi)
	leaq	(%r9,%r9,4), %rdx
	movq	16(%r10,%rdx,8), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_15
## %bb.14:
	movq	24(%r10,%rdx,8), %rcx
	cmpq	%rcx, %rax
	jle	LBB0_16
LBB0_15:
	movq	%rcx, 8(%rdi)
LBB0_16:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CPCAP_FOUR_POINT_TWO_ADC,4,2   ## @CPCAP_FOUR_POINT_TWO_ADC
	.no_dead_strip	_cpcap_adc_phase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_adc_phase
_cpcap_adc_phase:                       ; @cpcap_adc_phase
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #16]
	ldr	w9, [x0]
	sub	w10, w9, #128
	cmp	w10, #2
	b.hs	LBB0_3
; %bb.1:
	ldrsw	x9, [x0, #4]
	mov	w10, #40
	madd	x11, x9, x10, x8
	ldrsw	x12, [x11, #32]
	ldr	x13, [x0, #8]
Lloh0:
	adrp	x10, _CPCAP_FOUR_POINT_TWO_ADC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CPCAP_FOUR_POINT_TWO_ADC@GOTPAGEOFF]
Lloh2:
	ldrsw	x10, [x10]
	add	x12, x12, x10
	sub	x12, x13, x12
	ldp	x13, x11, [x11]
	mul	x12, x12, x13
	str	x12, [x0, #8]
	cbz	x11, LBB0_10
; %bb.2:
	sdiv	x11, x12, x11
	add	x10, x11, x10
	b	LBB0_7
LBB0_3:
	ldr	x10, [x0, #24]
	cmp	w9, #130
	b.ne	LBB0_5
; %bb.4:
	ldr	w9, [x0, #4]
LBB0_5:
	add	x10, x10, w9, sxtw #3
	ldr	x11, [x0, #8]
	ldpsw	x10, x12, [x10]
	add	x11, x11, x12
	add	x11, x11, x10
	mov	w10, #40
	smaddl	x10, w9, w10, x8
	ldp	x12, x10, [x10]
	mul	x11, x11, x12
	str	x11, [x0, #8]
	cbz	x10, LBB0_10
; %bb.6:
	sxtw	x9, w9
	sdiv	x10, x11, x10
	mov	w11, #40
	madd	x11, x9, x11, x8
	ldrsw	x11, [x11, #32]
	add	x10, x10, x11
LBB0_7:
	str	x10, [x0, #8]
	mov	w11, #40
	madd	x11, x9, x11, x8
	ldr	x11, [x11, #16]
	cmp	x10, x11
	b.lt	LBB0_9
; %bb.8:
	mov	w11, #40
	madd	x8, x9, x11, x8
	ldr	x11, [x8, #24]
	cmp	x10, x11
	b.le	LBB0_10
LBB0_9:
	str	x11, [x0, #8]
LBB0_10:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CPCAP_FOUR_POINT_TWO_ADC,4,2   ; @CPCAP_FOUR_POINT_TWO_ADC
	.no_dead_strip	_cpcap_adc_phase
.subsections_via_symbols
