	.file	"extr_s3c24xx-dma.c_s3c24xx_dma_get_phy.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no phy channel available\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"could not enable clock for channel %d, err %d\n"
	.text
	.p2align 4
	.type	s3c24xx_dma_get_phy, @function
s3c24xx_dma_get_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR [rdi]
	mov	rdx, QWORD PTR 16[r13]
	mov	eax, DWORD PTR [rdx]
	test	eax, eax
	jle	.L10
	mov	r14, rdi
	xor	ebp, ebp
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r12, QWORD PTR 24[r13]
	add	r12, rbp
	mov	eax, DWORD PTR 20[r12]
	test	eax, eax
	je	.L4
	mov	rsi, r12
	mov	rdi, r14
	call	s3c24xx_dma_phy_valid@PLT
	test	eax, eax
	je	.L19
	lea	r15, 16[r12]
	xor	esi, esi
	mov	rdi, r15
	call	spin_lock_irqsave@PLT
	cmp	QWORD PTR [r12], 0
	je	.L21
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
.L19:
	mov	rdx, QWORD PTR 16[r13]
.L4:
	mov	eax, DWORD PTR [rdx]
	add	ebx, 1
	add	rbp, 24
	cmp	eax, ebx
	jg	.L7
.L2:
	cmp	ebx, eax
	je	.L22
	mov	rax, QWORD PTR 8[r13]
	cmp	QWORD PTR [rax], 0
	jne	.L23
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[r12]
	call	clk_enable@PLT
	test	eax, eax
	je	.L1
	mov	edx, DWORD PTR 8[r12]
	mov	rdi, QWORD PTR 0[r13]
	mov	ecx, eax
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	QWORD PTR [r12], 0
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	QWORD PTR [r12], r14
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR 16[r13]
	mov	eax, DWORD PTR [rax]
	jmp	.L2
.L10:
	xor	ebx, ebx
	xor	r12d, r12d
	jmp	.L2
.L22:
	mov	rdi, QWORD PTR 0[r13]
	lea	rsi, .LC0[rip]
	xor	r12d, r12d
	call	dev_warn@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	s3c24xx_dma_get_phy, .-s3c24xx_dma_get_phy
	.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_s3c24xx-dma.c_s3c24xx_dma_get_phy.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no phy channel available\012\000"
	.align	2
.LC1:
	.ascii	"could not enable clock for channel %d, err %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	s3c24xx_dma_get_phy, %function
s3c24xx_dma_get_phy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0]
	ldr	r2, [r8, #8]
	ldr	r3, [r2]
	cmp	r3, #0
	ble	.L10
	mov	r9, r0
	mov	r4, #0
.L7:
	ldr	r6, [r8, #12]
	add	r7, r4, r4, lsl #2
	add	r5, r6, r7, lsl #2
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L4
	mov	r1, r5
	mov	r0, r9
	bl	s3c24xx_dma_phy_valid
	cmp	r0, #0
	add	r10, r5, #12
	beq	.L22
	mov	r1, #0
	mov	r0, r10
	bl	spin_lock_irqsave
	ldr	r3, [r6, r7, lsl #2]
	cmp	r3, #0
	beq	.L24
	mov	r0, r10
	mov	r1, #0
	bl	spin_unlock_irqrestore
.L22:
	ldr	r2, [r8, #8]
.L4:
	ldr	r3, [r2]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L7
.L2:
	cmp	r4, r3
	beq	.L25
	ldr	r3, [r8, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	ldr	r0, [r5, #8]
	bl	clk_enable
	subs	r3, r0, #0
	beq	.L1
	ldr	r2, [r5, #4]
	ldr	r0, [r8]
	ldr	r1, .L27
	bl	dev_err
	mov	r3, #0
	str	r3, [r5]
	mov	r5, r3
	b	.L1
.L24:
	mov	r0, r10
	mov	r1, #0
	str	r9, [r5]
	bl	spin_unlock_irqrestore
	ldr	r3, [r8, #8]
	ldr	r3, [r3]
	b	.L2
.L10:
	mov	r4, #0
	mov	r5, r4
	b	.L2
.L25:
	ldr	r0, [r8]
	ldr	r1, .L27+4
	bl	dev_warn
	mov	r5, #0
	b	.L1
.L28:
	.align	2
.L27:
	.word	.LC1
	.word	.LC0
	.size	s3c24xx_dma_get_phy, .-s3c24xx_dma_get_phy
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
