	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_sar_adc_read_raw_sample
_meson_sar_adc_read_raw_sample:         ## @meson_sar_adc_read_raw_sample
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_iio_priv
	movq	%rax, %r13
	leaq	12(%rax), %rbx
	movq	_MESON_SAR_ADC_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_meson_sar_adc_get_fifo_count
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.2:
	movl	8(%r13), %edi
	movq	_MESON_SAR_ADC_FIFO_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movq	_MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_FIELD_GET
	movl	(%r12), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_6
## %bb.3:
	movq	_MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_FIELD_GET
	movl	%eax, %r12d
	movq	(%r13), %rax
	movq	(%rax), %rdi
	decq	%rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%eax, %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_meson_sar_adc_calib_val
	movl	%eax, (%r14)
	jmp	LBB0_9
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MESON_SAR_ADC_TIMEOUT,4,2      ## @MESON_SAR_ADC_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADC FIFO has %d element(s) instead of one\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MESON_SAR_ADC_FIFO_RD,4,2      ## @MESON_SAR_ADC_FIFO_RD
	.comm	_MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK,4,2 ## @MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK
L_.str.1:                               ## @.str.1
	.asciz	"ADC FIFO entry belongs to channel %d instead of %lu\n"

	.comm	_MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK,4,2 ## @MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK
	.no_dead_strip	_meson_sar_adc_read_raw_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_sar_adc_read_raw_sample
_meson_sar_adc_read_raw_sample:         ; @meson_sar_adc_read_raw_sample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x21, x0
	add	x23, x0, #12
Lloh0:
	adrp	x8, _MESON_SAR_ADC_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MESON_SAR_ADC_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x23
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_meson_sar_adc_get_fifo_count
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x21, #8]
Lloh3:
	adrp	x8, _MESON_SAR_ADC_FIFO_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MESON_SAR_ADC_FIFO_RD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
Lloh6:
	adrp	x8, _MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_FIELD_GET
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_FIELD_GET
	mov	x22, x0
	ldr	x8, [x21]
	ldr	x8, [x8]
	sub	x0, x8, #1
	mov	w1, #0
	bl	_GENMASK
	and	w1, w0, w22
	mov	x0, x19
	bl	_meson_sar_adc_calib_val
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20]
	b	LBB0_9
LBB0_4:
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x2, x0
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MESON_SAR_ADC_TIMEOUT,4,2      ; @MESON_SAR_ADC_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADC FIFO has %d element(s) instead of one\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MESON_SAR_ADC_FIFO_RD,4,2      ; @MESON_SAR_ADC_FIFO_RD
	.comm	_MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK,4,2 ; @MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK
l_.str.1:                               ; @.str.1
	.asciz	"ADC FIFO entry belongs to channel %d instead of %lu\n"

	.comm	_MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK,4,2 ; @MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK
	.no_dead_strip	_meson_sar_adc_read_raw_sample
.subsections_via_symbols
