	.file	"extr_imx-sdma.c_sdma_alloc_chan_resources.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"MEMCPY in case?\n"
	.text
	.p2align 4
	.type	sdma_alloc_chan_resources, @function
sdma_alloc_chan_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	to_sdma_chan@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR [r12]
	test	rax, rax
	je	.L17
	mov	edx, DWORD PTR [rax]
	mov	r12d, DWORD PTR 24[rax]
	mov	ebp, 2
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	cmp	edx, 128
	je	.L4
	mov	ebp, 3
	cmp	edx, 130
	jne	.L3
.L4:
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR [rbx]
	mov	DWORD PTR 24[rbx], r12d
	mov	QWORD PTR 16[rbx], rcx
	mov	edi, DWORD PTR [rax]
	call	clk_enable@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L18
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR 4[rax]
	call	clk_enable@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L6
	mov	esi, ebp
	mov	rdi, rbx
	call	sdma_set_channel_priority@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR 4[rax]
	call	clk_disable@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR [rax]
	call	clk_disable@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR 8[rax]
	call	dev_dbg@PLT
	mov	r12d, DWORD PTR IMX_DMATYPE_MEMORY[rip]
	mov	rdi, rbx
	mov	DWORD PTR [rsp], 2
	mov	QWORD PTR 16[rsp], 0
	mov	esi, r12d
	mov	DWORD PTR 24[rsp], r12d
	mov	QWORD PTR 8[rsp], 0
	call	sdma_get_pc@PLT
	xor	eax, eax
	xor	ecx, ecx
.L3:
	mov	ebp, 1
	jmp	.L4
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sdma_alloc_chan_resources, .-sdma_alloc_chan_resources
	.comm	IMX_DMATYPE_MEMORY,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_imx-sdma.c_sdma_alloc_chan_resources.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MEMCPY in case?\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdma_alloc_chan_resources, %function
sdma_alloc_chan_resources:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	ldr	r3, .L18
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	to_sdma_chan
	ldr	r5, [r5]
	mov	r4, r0
	cmp	r5, #0
	beq	.L15
	ldr	r3, [r5]
	ldr	r6, [r5, #12]
	cmp	r3, #128
	ldr	r2, [r5, #8]
	moveq	r7, #2
	ldr	r5, [r5, #4]
	beq	.L4
	cmp	r3, #130
	moveq	r7, #3
	bne	.L3
.L4:
	ldr	r3, [r4]
	str	r5, [r4, #4]
	ldr	r0, [r3]
	str	r6, [r4, #12]
	str	r2, [r4, #8]
	bl	clk_enable
	subs	r5, r0, #0
	beq	.L16
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L16:
	ldr	r3, [r4]
	ldr	r0, [r3, #4]
	bl	clk_enable
	subs	r5, r0, #0
	bne	.L6
	mov	r1, r7
	mov	r0, r4
	bl	sdma_set_channel_priority
	subs	r5, r0, #0
	beq	.L1
	ldr	r3, [r4]
	ldr	r0, [r3, #4]
	bl	clk_disable
.L6:
	ldr	r3, [r4]
	ldr	r0, [r3]
	bl	clk_disable
	b	.L1
.L15:
	ldr	r3, [r0]
	ldr	r1, .L18+4
	ldr	r0, [r3, #8]
	bl	dev_dbg
	mov	r3, #2
	ldr	r2, .L18+8
	mov	r0, r4
	ldr	r6, [r2]
	str	r5, [sp, #12]
	mov	r1, r6
	str	r5, [sp, #8]
	str	r6, [sp, #16]
	str	r3, [sp, #4]
	bl	sdma_get_pc
	mov	r2, r5
.L3:
	mov	r7, #1
	b	.L4
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	.LC0
	.word	IMX_DMATYPE_MEMORY
	.size	sdma_alloc_chan_resources, .-sdma_alloc_chan_resources
	.comm	IMX_DMATYPE_MEMORY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
