	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function am335x_tscadc_need_adc
_am335x_tscadc_need_adc:                ## @am335x_tscadc_need_adc
	.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	%rdi, %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movl	8(%rbx), %edi
	movq	_REG_ADCFSM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movq	_SEQ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	leaq	12(%rbx), %r14
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_wait@GOTPCREL(%rip), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_prepare_to_wait
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	callq	_schedule
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_finish_wait
	movl	8(%rbx), %edi
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	-44(%rbp), %eax
	movq	_SEQ_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%cl
	movq	_CHARGE_STEP@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	sete	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	movl	$0, (%rbx)
LBB0_2:
	movl	$1, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_REG_ADCFSM,4,2                 ## @REG_ADCFSM
	.comm	_SEQ_STATUS,4,2                 ## @SEQ_STATUS
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_CHARGE_STEP,4,2                ## @CHARGE_STEP
	.no_dead_strip	_am335x_tscadc_need_adc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function am335x_tscadc_need_adc
_am335x_tscadc_need_adc:                ; @am335x_tscadc_need_adc
	.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	x19, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x23, _REG_ADCFSM@GOTPAGE
Lloh4:
	ldr	x23, [x23, _REG_ADCFSM@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x24, _SEQ_STATUS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SEQ_STATUS@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
	add	x20, x19, #12
Lloh7:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x21, _wait@GOTPAGE
Lloh11:
	ldr	x21, [x21, _wait@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	bl	_prepare_to_wait
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_unlock_irq
	bl	_schedule
	mov	x0, x22
	bl	_spin_lock_irq
	mov	x0, x20
	mov	x1, x21
	bl	_finish_wait
	ldr	w0, [x19, #8]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	tst	w9, w8
	cset	w9, ne
Lloh12:
	adrp	x10, _CHARGE_STEP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CHARGE_STEP@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w8, eq
	and	w0, w9, w8
	bl	_WARN_ON
	str	wzr, [x19]
LBB0_2:
	mov	w8, #1
	str	w8, [x19, #4]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_REG_ADCFSM,4,2                 ; @REG_ADCFSM
	.comm	_SEQ_STATUS,4,2                 ; @SEQ_STATUS
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_CHARGE_STEP,4,2                ; @CHARGE_STEP
	.no_dead_strip	_am335x_tscadc_need_adc
.subsections_via_symbols
