	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc13783_adc_read
_mc13783_adc_read:                      ## @mc13783_adc_read
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_to_sensor_dev_attr
	movl	(%rax), %r15d
	movl	(%rbx), %edi
	movq	_MC13XXX_ADC_MODE_MULT_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %r9
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mc13xxx_adc_do_conversion
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	cmpl	$15, %r15d
	movl	$15, %ecx
	cmovbl	%r15d, %ecx
	movl	%ecx, %edx
	andl	$3, %edx
	testb	$4, %cl
	movl	$2, %esi
	movl	$14, %ecx
	cmovel	%esi, %ecx
	movl	-48(%rbp,%rdx,4), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %edx
	andl	$1023, %edx                     ## imm = 0x3FF
	movl	%edx, (%r14)
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MC13XXX_ADC_MODE_MULT_CHAN,4,2 ## @MC13XXX_ADC_MODE_MULT_CHAN
	.no_dead_strip	_mc13783_adc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc13783_adc_read
_mc13783_adc_read:                      ; @mc13783_adc_read
	.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	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_dev_get_drvdata
	mov	x21, x0
	mov	x0, x20
	bl	_to_sensor_dev_attr
	ldr	w20, [x0]
	ldr	w0, [x21]
Lloh3:
	adrp	x8, _MC13XXX_ADC_MODE_MULT_CHAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MC13XXX_ADC_MODE_MULT_CHAN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x21, sp, #8
	add	x5, sp, #8
	mov	x2, x20
	mov	w3, #0
	mov	w4, #0
	bl	_mc13xxx_adc_do_conversion
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w8, #15
	cmp	w20, #15
	csel	w8, w20, w8, lo
	and	w9, w8, #0x3
	ldr	w9, [x21, w9, uxtw #2]
	tst	w8, #0x4
	mov	w8, #14
	mov	w10, #2
	csel	w8, w10, w8, eq
	lsr	w8, w9, w8
	and	w8, w8, #0x3ff
	str	w8, [x19]
LBB0_2:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MC13XXX_ADC_MODE_MULT_CHAN,4,2 ; @MC13XXX_ADC_MODE_MULT_CHAN
	.no_dead_strip	_mc13783_adc_read
.subsections_via_symbols
