	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_prepare_for_irq
_sun4i_prepare_for_irq:                 ## @sun4i_prepare_for_irq
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_iio_priv
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_pm_runtime_get_sync
	leaq	20(%r12), %rdi
	callq	_reinit_completion
	movl	16(%r12), %r13d
	movq	_SUN4I_GPADC_INT_FIFOC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	callq	_SUN4I_GPADC_INT_FIFOC_TP_FIFO_TRIG_LEVEL
	movq	_SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	16(%r12), %edi
	movq	_SUN4I_GPADC_CTRL1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movl	16(%r12), %edi
	movl	(%r13), %r13d
	movq	8(%r12), %rax
	movl	(%rax), %ebx
	cmpl	%r15d, (%r12)
	jne	LBB0_5
## %bb.3:
	orl	4(%rax), %ebx
	movl	%edi, %r15d
	movl	%r14d, %edi
	callq	*8(%rax)
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	movq	8(%r12), %rax
	movl	16(%rax), %r15d
	andl	-44(%rbp), %r15d
	movl	%r14d, %edi
	callq	*8(%rax)
	cmpl	%eax, %r15d
	je	LBB0_6
## %bb.4:
	movl	$10, %edi
	callq	_mdelay
	jmp	LBB0_6
LBB0_5:
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
LBB0_6:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.7:
	movl	-44(%rbp), %eax
	movq	8(%r12), %rcx
	notl	%eax
	xorl	%ebx, %ebx
	testl	%eax, 4(%rcx)
	je	LBB0_9
## %bb.8:
	movl	$100, %edi
	callq	_mdelay
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	_SUN4I_GPADC_INT_FIFOC,4,2      ## @SUN4I_GPADC_INT_FIFOC
	.comm	_SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH,4,2 ## @SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH
	.comm	_SUN4I_GPADC_CTRL1,4,2          ## @SUN4I_GPADC_CTRL1
	.no_dead_strip	_sun4i_prepare_for_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_prepare_for_irq
_sun4i_prepare_for_irq:                 ; @sun4i_prepare_for_irq
	.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	x21, x2
	mov	x20, x1
	mov	x22, x0
	bl	_iio_priv
	mov	x19, x0
	ldr	w0, [x22]
	bl	_pm_runtime_get_sync
	add	x0, x19, #20
	bl	_reinit_completion
	ldr	w22, [x19, #16]
Lloh0:
	adrp	x8, _SUN4I_GPADC_INT_FIFOC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN4I_GPADC_INT_FIFOC@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	w0, #1
	bl	_SUN4I_GPADC_INT_FIFOC_TP_FIFO_TRIG_LEVEL
Lloh3:
	adrp	x8, _SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x23, _SUN4I_GPADC_CTRL1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SUN4I_GPADC_CTRL1@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	w9, [x19]
	ldr	w22, [x19, #16]
	ldr	w23, [x23]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	cmp	w9, w21
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x8, #4]
	orr	w21, w9, w2
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	orr	w2, w21, w0
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	mov	x22, x0
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #8]
	ldr	w10, [x9, #16]
	and	w21, w10, w8
	ldr	x8, [x9, #8]
	mov	x0, x20
	blr	x8
	cmp	w21, w0
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #10
	bl	_mdelay
	b	LBB0_6
LBB0_5:
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	mov	x22, x0
LBB0_6:
	cbnz	w22, LBB0_10
; %bb.7:
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #8]
	ldr	w9, [x9, #4]
	bics	wzr, w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	w0, #100
	bl	_mdelay
LBB0_9:
	mov	w22, #0
LBB0_10:
	mov	x0, x22
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_GPADC_INT_FIFOC,4,2      ; @SUN4I_GPADC_INT_FIFOC
	.comm	_SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH,4,2 ; @SUN4I_GPADC_INT_FIFOC_TP_FIFO_FLUSH
	.comm	_SUN4I_GPADC_CTRL1,4,2          ; @SUN4I_GPADC_CTRL1
	.no_dead_strip	_sun4i_prepare_for_irq
.subsections_via_symbols
