	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_adc_read_measurement
_ti_adc_read_measurement:               ## @ti_adc_read_measurement
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$3, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$2, %eax
	jne	LBB0_8
## %bb.2:
	movl	8(%rbx), %edi
	leaq	-32(%rbp), %rsi
	movl	$2, %edx
	callq	_spi_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	-32(%rbp), %edi
	callq	_be16_to_cpu
	jmp	LBB0_6
LBB0_4:
	movl	8(%rbx), %edi
	leaq	-28(%rbp), %rsi
	movl	$3, %edx
	callq	_spi_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	-28(%rbp), %edi
	callq	_be32_to_cpu
	sarl	$8, %eax
LBB0_6:
	movl	%eax, (%r15)
	movb	4(%rbx), %cl
	sarl	%cl, %eax
	movq	(%r14), %rsi
	decq	%rsi
	movl	%eax, %edi
	callq	_sign_extend32
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ti_adc_read_measurement
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_adc_read_measurement
_ti_adc_read_measurement:               ; @ti_adc_read_measurement
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #3
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #2
	b.ne	LBB0_7
; %bb.2:
	ldr	w0, [x21, #8]
	add	x1, sp, #12
	mov	w2, #2
	bl	_spi_read
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	b	LBB0_6
LBB0_4:
	ldr	w0, [x21, #8]
	add	x1, sp, #8
	mov	w2, #3
	bl	_spi_read
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w0, [sp, #8]
	bl	_be32_to_cpu
	asr	w0, w0, #8
LBB0_6:
	str	w0, [x19]
	ldr	w8, [x21, #4]
	asr	w0, w0, w8
	ldr	x8, [x20]
	sub	x1, x8, #1
	bl	_sign_extend32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ti_adc_read_measurement
.subsections_via_symbols
