	.file	"extr_ksz884x.c_ksz_alloc_desc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ksz_alloc_desc, @function
ksz_alloc_desc:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rdx, 24[rdi]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR 72[rdi]
	mov	eax, DWORD PTR 76[rdi]
	imul	eax, esi
	mov	esi, DWORD PTR 48[rdi]
	imul	esi, DWORD PTR 52[rdi]
	add	esi, eax
	add	esi, DWORD PTR DESC_ALIGNMENT[rip]
	mov	DWORD PTR [rdi], esi
	mov	edi, DWORD PTR 40[rdi]
	call	pci_zalloc_consistent@PLT
	mov	QWORD PTR 32[rbx], rax
	test	rax, rax
	je	.L10
	mov	esi, DWORD PTR DESC_ALIGNMENT[rip]
	cdq
	mov	rcx, rax
	idiv	esi
	xor	eax, eax
	test	edx, edx
	je	.L4
	sub	esi, edx
	movsx	rax, esi
	lea	rcx, [rcx+rax*4]
.L4:
	add	rax, QWORD PTR 24[rbx]
	mov	QWORD PTR 16[rbx], rcx
	lea	rdi, 72[rbx]
	xor	esi, esi
	mov	rdx, rax
	mov	QWORD PTR 8[rbx], rax
	lea	rbp, 48[rbx]
	mov	QWORD PTR 80[rbx], rax
	mov	eax, DWORD PTR 76[rbx]
	imul	eax, DWORD PTR 72[rbx]
	mov	QWORD PTR 88[rbx], rcx
	cdqe
	lea	rcx, [rcx+rax*4]
	add	rax, rdx
	mov	QWORD PTR 64[rbx], rcx
	mov	QWORD PTR 56[rbx], rax
	call	ksz_alloc_soft_desc@PLT
	mov	r8, rax
	mov	eax, 1
	test	r8, r8
	je	.L11
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	mov	esi, 1
	call	ksz_alloc_soft_desc@PLT
	test	rax, rax
	setne	al
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movzx	eax, al
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	DWORD PTR [rbx], 0
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ksz_alloc_desc, .-ksz_alloc_desc
	.comm	DESC_ALIGNMENT,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_ksz884x.c_ksz_alloc_desc.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ksz_alloc_desc, %function
ksz_alloc_desc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r2, r0
	ldr	r3, [r0, #24]
	ldr	r0, [r0, #28]
	ldr	r1, [r4, #40]
	mul	r3, r0, r3
	ldr	r0, [r4, #44]
	ldr	r6, .L13
	mla	r1, r0, r1, r3
	ldr	r3, [r6]
	ldr	r0, [r4, #20]
	add	r1, r1, r3
	str	r1, [r2], #12
	bl	pci_zalloc_consistent
	subs	r5, r0, #0
	str	r0, [r4, #16]
	beq	.L11
	ldr	r6, [r6]
	mov	r1, r6
	bl	__aeabi_idivmod
	ldr	r2, [r4, #40]
	ldr	r3, [r4, #44]
	cmp	r1, #0
	mul	r3, r2, r3
	ldr	r2, [r4, #12]
	subne	r1, r6, r1
	addne	r5, r5, r1, lsl #2
	add	r1, r1, r2
	str	r5, [r4, #8]
	str	r5, [r4, #52]
	add	r5, r5, r3, lsl #2
	add	r3, r1, r3
	str	r1, [r4, #4]
	str	r1, [r4, #48]
	str	r5, [r4, #36]
	mov	r1, #0
	str	r3, [r4, #32]
	add	r0, r4, #40
	bl	ksz_alloc_soft_desc
	cmp	r0, #0
	add	r0, r4, #24
	beq	.L12
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L12:
	mov	r1, #1
	bl	ksz_alloc_soft_desc
	subs	r0, r0, #0
	movne	r0, #1
	pop	{r4, r5, r6, pc}
.L11:
	mov	r0, #1
	str	r5, [r4]
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	DESC_ALIGNMENT
	.size	ksz_alloc_desc, .-ksz_alloc_desc
	.comm	DESC_ALIGNMENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
