	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp8788_get_adc_result
_lp8788_get_adc_result:                 ## @lp8788_get_adc_result
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_ARRAY_SIZE
	addl	%ebx, %ebx
	movq	_ADC_CONV_START@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movl	%eax, %r15d
	movl	(%r12), %edi
	movq	_LP8788_ADC_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_lp8788_write_byte
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	$0, -52(%rbp)
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	movq	_LP8788_ADC_DONE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_lp8788_read_byte
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	cmpl	$0, -52(%rbp)
	je	LBB0_3
LBB0_10:
	movl	(%r12), %edi
	movq	_LP8788_ADC_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%r15d, %ecx
	callq	_lp8788_read_multi_bytes
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	-48(%rbp), %eax
	movl	-44(%rbp), %ecx
	movzbl	%al, %eax
	shll	$4, %eax
	shrl	$4, %ecx
	andl	$15, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_lp8788_read_byte
	testl	%eax, %eax
	je	LBB0_4
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$0, -52(%rbp)
	jne	LBB0_10
## %bb.5:
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_lp8788_read_byte
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	cmpl	$0, -52(%rbp)
	jne	LBB0_10
## %bb.7:
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_lp8788_read_byte
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	cmpl	$0, -52(%rbp)
	jne	LBB0_10
## %bb.9:
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_lp8788_read_byte
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_10
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ADC_CONV_START,4,2             ## @ADC_CONV_START
	.comm	_LP8788_ADC_CONF,4,2            ## @LP8788_ADC_CONF
	.comm	_LP8788_ADC_DONE,4,2            ## @LP8788_ADC_DONE
	.comm	_LP8788_ADC_RAW,4,2             ## @LP8788_ADC_RAW
	.no_dead_strip	_lp8788_get_adc_result
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp8788_get_adc_result
_lp8788_get_adc_result:                 ; @lp8788_get_adc_result
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x20, x0
Lloh3:
	adrp	x8, _ADC_CONV_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADC_CONV_START@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w2, w8, w22, lsl #1
	ldr	w0, [x21]
Lloh6:
	adrp	x8, _LP8788_ADC_CONF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LP8788_ADC_CONF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_lp8788_write_byte
	cbnz	w0, LBB0_6
; %bb.1:
	str	wzr, [sp, #12]
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x21]
Lloh9:
	adrp	x22, _LP8788_ADC_DONE@GOTPAGE
Lloh10:
	ldr	x22, [x22, _LP8788_ADC_DONE@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_lp8788_read_byte
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
LBB0_3:
	ldr	w0, [x21]
Lloh11:
	adrp	x8, _LP8788_ADC_RAW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LP8788_ADC_RAW@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x3, x20
	bl	_lp8788_read_multi_bytes
	cbnz	w0, LBB0_6
; %bb.4:
	ldp	w8, w9, [sp, #16]
	ubfiz	w8, w8, #4, #8
	bfxil	w8, w9, #4, #4
	str	w8, [x19]
	b	LBB0_6
LBB0_5:
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x21]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_lp8788_read_byte
	cbz	w0, LBB0_8
LBB0_6:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.7:
	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
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_3
; %bb.9:
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x21]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_lp8788_read_byte
	cbnz	w0, LBB0_6
; %bb.10:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_3
; %bb.11:
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x21]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_lp8788_read_byte
	cbnz	w0, LBB0_6
; %bb.12:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_3
; %bb.13:
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x21]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_lp8788_read_byte
	cbnz	w0, LBB0_6
	b	LBB0_3
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ADC_CONV_START,4,2             ; @ADC_CONV_START
	.comm	_LP8788_ADC_CONF,4,2            ; @LP8788_ADC_CONF
	.comm	_LP8788_ADC_DONE,4,2            ; @LP8788_ADC_DONE
	.comm	_LP8788_ADC_RAW,4,2             ; @LP8788_ADC_RAW
	.no_dead_strip	_lp8788_get_adc_result
.subsections_via_symbols
