	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp8788_adc_read_raw
_lp8788_adc_read_raw:                   ## @lp8788_adc_read_raw
	.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	%r8, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, %r12
	movl	(%rbx), %r13d
	movq	%rax, %rdi
	callq	_mutex_lock
	cmpq	$128, %r14
	je	LBB0_5
## %bb.1:
	cmpq	$129, %r14
	jne	LBB0_6
## %bb.2:
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	callq	_lp8788_get_adc_result
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_lp8788_scale@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r13,4), %rcx
	imulq	$1125899907, %rcx, %rcx         ## imm = 0x431BDE83
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$50, %rcx
	addl	%edx, %ecx
	movl	%ecx, (%r15)
	movslq	(%rax,%r13,4), %rax
	imulq	$1125899907, %rax, %rcx         ## imm = 0x431BDE83
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$50, %rcx
	addl	%edx, %ecx
	imull	$1000000, %ecx, %ecx            ## imm = 0xF4240
	subl	%ecx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_lp8788_scale,8,3               ## @lp8788_scale
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_lp8788_adc_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp8788_adc_read_raw
_lp8788_adc_read_raw:                   ; @lp8788_adc_read_raw
	.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	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	bl	_iio_priv
	mov	x19, x0
	ldr	w23, [x23]
	bl	_mutex_lock
	cmp	x22, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	x22, #129
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_lp8788_get_adc_result
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IIO_VAL_INT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_VAL_INT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w0, #0
	csneg	w20, w9, w8, eq
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _lp8788_scale@GOTPAGE
Lloh7:
	ldr	x8, [x8, _lp8788_scale@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	lsl	x9, x23, #2
	ldrsw	x10, [x8, x9]
	mov	w11, #56963
	movk	w11, #17179, lsl #16
	mul	x10, x10, x11
	lsr	x12, x10, #63
	asr	x10, x10, #50
	add	w10, w10, w12
	str	w10, [x21]
	ldrsw	x8, [x8, x9]
	mul	x9, x8, x11
	lsr	x10, x9, #63
	asr	x9, x9, #50
	add	w9, w9, w10
	mov	w10, #16960
	movk	w10, #15, lsl #16
	msub	w8, w9, w10, w8
	str	w8, [x20]
Lloh9:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_lp8788_scale,8,3               ; @lp8788_scale
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_lp8788_adc_read_raw
.subsections_via_symbols
