	.file	"extr_hidma_ll.c_hidma_ll_disable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hidma_ll_disable
	.type	hidma_ll_disable, @function
hidma_ll_disable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	hidma_ll_isenabled@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L8
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, QWORD PTR HIDMA_TRCA_CTRLSTS_REG[rip]
	add	rdi, QWORD PTR 24[rbx]
	call	readl@PLT
	mov	r12d, DWORD PTR HIDMA_CH_CONTROL_MASK[rip]
	mov	rsi, QWORD PTR HIDMA_TRCA_CTRLSTS_REG[rip]
	add	rsi, QWORD PTR 24[rbx]
	sal	r12d, 16
	not	r12d
	and	eax, r12d
	mov	r12d, DWORD PTR HIDMA_CH_SUSPEND[rip]
	sal	r12d, 16
	or	r12d, eax
	mov	edi, r12d
	call	writel@PLT
	mov	edi, r12d
	call	HIDMA_CH_STATE@PLT
	xor	edx, edx
	mov	esi, r12d
	mov	r8d, 10000
	cmp	QWORD PTR HIDMA_CH_SUSPENDED[rip], rax
	mov	rdi, QWORD PTR HIDMA_TRCA_CTRLSTS_REG[rip]
	mov	ecx, 1000
	sete	dl
	add	rdi, QWORD PTR 24[rbx]
	call	readl_poll_timeout@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, QWORD PTR HIDMA_EVCA_CTRLSTS_REG[rip]
	add	rdi, QWORD PTR [rbx]
	call	readl@PLT
	mov	r12d, DWORD PTR HIDMA_CH_CONTROL_MASK[rip]
	mov	rsi, QWORD PTR HIDMA_EVCA_CTRLSTS_REG[rip]
	add	rsi, QWORD PTR [rbx]
	sal	r12d, 16
	not	r12d
	and	eax, r12d
	mov	r12d, DWORD PTR HIDMA_CH_SUSPEND[rip]
	sal	r12d, 16
	or	r12d, eax
	mov	edi, r12d
	call	writel@PLT
	mov	edi, r12d
	call	HIDMA_CH_STATE@PLT
	xor	edx, edx
	mov	esi, r12d
	mov	r8d, 10000
	cmp	QWORD PTR HIDMA_CH_SUSPENDED[rip], rax
	mov	rdi, QWORD PTR HIDMA_EVCA_CTRLSTS_REG[rip]
	mov	ecx, 1000
	sete	dl
	add	rdi, QWORD PTR [rbx]
	call	readl_poll_timeout@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR HIDMA_CH_SUSPENDED[rip]
	mov	rsi, QWORD PTR HIDMA_EVCA_IRQ_EN_REG[rip]
	xor	edi, edi
	add	rsi, QWORD PTR [rbx]
	mov	QWORD PTR 16[rbx], rax
	mov	QWORD PTR 8[rbx], rax
	call	writel@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	hidma_ll_disable, .-hidma_ll_disable
	.comm	HIDMA_TRCA_CTRLSTS_REG,8,8
	.comm	HIDMA_EVCA_IRQ_EN_REG,8,8
	.comm	HIDMA_EVCA_CTRLSTS_REG,8,8
	.comm	HIDMA_CH_SUSPENDED,8,8
	.comm	HIDMA_CH_SUSPEND,4,4
	.comm	HIDMA_CH_CONTROL_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hidma_ll.c_hidma_ll_disable.c"
	.text
	.align	2
	.global	hidma_ll_disable
	.syntax unified
	.arm
	.fpu softvfp
	.type	hidma_ll_disable, %function
hidma_ll_disable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	sp, sp, #8
	mov	r5, r0
	bl	hidma_ll_isenabled
	subs	r4, r0, #0
	bne	.L8
.L1:
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	ldr	r6, .L9
	ldr	r0, [r5, #12]
	ldr	r3, [r6]
	ldr	r9, .L9+4
	add	r0, r0, r3
	bl	readl
	ldr	r8, .L9+8
	ldr	r4, [r9]
	ldr	r2, [r8]
	ldr	r3, [r6]
	ldr	r1, [r5, #12]
	bic	r4, r0, r4, lsl #16
	orr	r4, r4, r2, lsl #16
	add	r1, r1, r3
	mov	r0, r4
	bl	writel
	ldr	r3, [r6]
	ldr	r10, [r5, #12]
	mov	r0, r4
	add	r10, r10, r3
	bl	HIDMA_CH_STATE
	mov	r3, r0
	ldr	r6, .L9+12
	ldr	r7, .L9+16
	ldr	r2, [r6]
	mov	r1, r4
	sub	r2, r2, r3
	clz	r2, r2
	mov	r0, r10
	mov	r3, #1000
	lsr	r2, r2, #5
	str	r7, [sp]
	bl	readl_poll_timeout
	subs	r4, r0, #0
	bne	.L1
	ldr	r10, .L9+20
	ldr	r0, [r5]
	ldr	r3, [r10]
	add	r0, r0, r3
	bl	readl
	ldr	r4, [r9]
	ldr	r2, [r8]
	ldr	r3, [r10]
	ldr	r1, [r5]
	bic	r4, r0, r4, lsl #16
	orr	r4, r4, r2, lsl #16
	add	r1, r1, r3
	mov	r0, r4
	bl	writel
	ldr	r3, [r10]
	ldr	r8, [r5]
	mov	r0, r4
	add	r8, r8, r3
	bl	HIDMA_CH_STATE
	mov	r3, r0
	ldr	r2, [r6]
	mov	r1, r4
	sub	r2, r2, r3
	clz	r2, r2
	mov	r0, r8
	mov	r3, #1000
	str	r7, [sp]
	lsr	r2, r2, #5
	bl	readl_poll_timeout
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, .L9+24
	ldr	r3, [r6]
	ldr	r2, [r2]
	ldr	r1, [r5]
	str	r3, [r5, #8]
	str	r3, [r5, #4]
	add	r1, r1, r2
	bl	writel
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	HIDMA_TRCA_CTRLSTS_REG
	.word	HIDMA_CH_CONTROL_MASK
	.word	HIDMA_CH_SUSPEND
	.word	HIDMA_CH_SUSPENDED
	.word	10000
	.word	HIDMA_EVCA_CTRLSTS_REG
	.word	HIDMA_EVCA_IRQ_EN_REG
	.size	hidma_ll_disable, .-hidma_ll_disable
	.comm	HIDMA_TRCA_CTRLSTS_REG,4,4
	.comm	HIDMA_EVCA_IRQ_EN_REG,4,4
	.comm	HIDMA_EVCA_CTRLSTS_REG,4,4
	.comm	HIDMA_CH_SUSPENDED,4,4
	.comm	HIDMA_CH_SUSPEND,4,4
	.comm	HIDMA_CH_CONTROL_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
