	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_adc_read_raw
_at91_adc_read_raw:                     ## @at91_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r12
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	%rax, %rbx
	cmpq	$128, %r15
	je	LBB0_7
## %bb.1:
	cmpq	$129, %r15
	jne	LBB0_8
## %bb.2:
	movq	%rax, %r13
	addq	$12, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	4(%r14), %edi
	movl	%edi, 20(%rbx)
	movq	_AT91_ADC_CHER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_AT91_ADC_CH
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_at91_adc_writel
	movq	_AT91_ADC_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%r14), %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_at91_adc_writel
	movq	_AT91_ADC_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT91_ADC_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_at91_adc_writel
	movl	(%rbx), %r15d
	movl	16(%rbx), %r12d
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_wait_event_interruptible_timeout
	movl	%eax, %r12d
	movq	_AT91_ADC_CHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%r14), %edi
	callq	_AT91_ADC_CH
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_at91_adc_writel
	movq	_AT91_ADC_IDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%r14), %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_at91_adc_writel
	testl	%r12d, %r12d
	jle	LBB0_4
## %bb.3:
	movl	4(%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	$0, (%rbx)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_6
LBB0_7:
	movl	8(%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r14), %eax
	movl	%eax, (%r12)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_4:
	jne	LBB0_6
## %bb.5:
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_ADC_CHER,4,2              ## @AT91_ADC_CHER
	.comm	_AT91_ADC_IER,4,2               ## @AT91_ADC_IER
	.comm	_AT91_ADC_CR,4,2                ## @AT91_ADC_CR
	.comm	_AT91_ADC_START,4,2             ## @AT91_ADC_START
	.comm	_AT91_ADC_CHDR,4,2              ## @AT91_ADC_CHDR
	.comm	_AT91_ADC_IDR,4,2               ## @AT91_ADC_IDR
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADC Channel %d timeout.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_at91_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 at91_adc_read_raw
_at91_adc_read_raw:                     ; @at91_adc_read_raw
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_iio_priv
	mov	x23, x0
	cmp	x24, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	x24, #129
	b.ne	LBB0_5
; %bb.2:
	add	x19, x23, #12
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x20, #4]
	str	w0, [x23, #20]
Lloh0:
	adrp	x8, _AT91_ADC_CHER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT91_ADC_CHER@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	bl	_AT91_ADC_CH
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_at91_adc_writel
Lloh3:
	adrp	x8, _AT91_ADC_IER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AT91_ADC_IER@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	ldr	w0, [x20, #4]
	bl	_BIT
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_at91_adc_writel
Lloh6:
	adrp	x8, _AT91_ADC_CR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AT91_ADC_CR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _AT91_ADC_START@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AT91_ADC_START@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_at91_adc_writel
	ldr	w24, [x23, #16]
	ldr	w25, [x23]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x24
	mov	x1, x25
	bl	_wait_event_interruptible_timeout
	mov	x24, x0
Lloh12:
	adrp	x8, _AT91_ADC_CHDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AT91_ADC_CHDR@GOTPAGEOFF]
Lloh14:
	ldr	w25, [x8]
	ldr	w0, [x20, #4]
	bl	_AT91_ADC_CH
	mov	x2, x0
	mov	x0, x23
	mov	x1, x25
	bl	_at91_adc_writel
Lloh15:
	adrp	x8, _AT91_ADC_IDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AT91_ADC_IDR@GOTPAGEOFF]
Lloh17:
	ldr	w25, [x8]
	ldr	w0, [x20, #4]
	bl	_BIT
	mov	x2, x0
	mov	x0, x23
	mov	x1, x25
	bl	_at91_adc_writel
	cmp	w24, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	w8, [x23, #4]
	str	w8, [x22]
	str	xzr, [x23]
Lloh18:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
	b	LBB0_8
LBB0_4:
	ldr	w8, [x23, #8]
	str	w8, [x22]
	ldr	w8, [x20]
	str	w8, [x19]
Lloh21:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
Lloh23:
	ldr	w24, [x8]
	b	LBB0_9
LBB0_5:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_6:
	cbnz	w24, LBB0_8
; %bb.7:
	ldr	w2, [x20, #4]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh29:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x24
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_ADC_CHER,4,2              ; @AT91_ADC_CHER
	.comm	_AT91_ADC_IER,4,2               ; @AT91_ADC_IER
	.comm	_AT91_ADC_CR,4,2                ; @AT91_ADC_CR
	.comm	_AT91_ADC_START,4,2             ; @AT91_ADC_START
	.comm	_AT91_ADC_CHDR,4,2              ; @AT91_ADC_CHDR
	.comm	_AT91_ADC_IDR,4,2               ; @AT91_ADC_IDR
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADC Channel %d timeout.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_at91_adc_read_raw
.subsections_via_symbols
