	.file	"extr_sdio.c_ath6kl_sdio_alloc_prep_scat_req.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ath6kl_sdio_alloc_prep_scat_req, @function
ath6kl_sdio_alloc_prep_scat_req:
.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
	lea	r13d, 0[0+rsi*4]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r15d, 32[r13]
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], edx
	test	ecx, ecx
	je	.L3
	mov	edx, DWORD PTR L1_CACHE_BYTES[rip]
	mov	eax, DWORD PTR ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER[rip]
	lea	r13d, [rax+rdx*2]
.L3:
	mov	eax, DWORD PTR 12[rsp]
	xor	ebx, ebx
	test	eax, eax
	jg	.L4
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	call	kzalloc@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L16
	call	L1_CACHE_ALIGN@PLT
	mov	QWORD PTR 16[r14], rax
.L9:
	mov	rdi, r12
	call	ath6kl_sdio_alloc_busreq@PLT
	test	rax, rax
	je	.L19
	mov	QWORD PTR [rax], r14
	mov	edi, DWORD PTR [r12]
	mov	rsi, r14
	add	ebx, 1
	mov	QWORD PTR 8[r14], rax
	mov	DWORD PTR [r14], ebp
	call	hif_scatter_req_add@PLT
	cmp	DWORD PTR 12[rsp], ebx
	je	.L11
.L4:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, r15d
	call	kzalloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L17
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, r13d
	test	ebp, ebp
	jne	.L20
	call	kzalloc@PLT
	mov	QWORD PTR 24[r14], rax
	test	rax, rax
	jne	.L9
.L16:
	mov	rdi, r14
	call	kfree@PLT
.L17:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L11:
	.cfi_restore_state
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L19:
	.cfi_restore_state
	mov	rdi, QWORD PTR 24[r14]
	call	kfree@PLT
	mov	rdi, QWORD PTR 16[r14]
	call	kfree@PLT
	mov	rdi, r14
	call	kfree@PLT
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	ath6kl_sdio_alloc_prep_scat_req, .-ath6kl_sdio_alloc_prep_scat_req
	.comm	L1_CACHE_BYTES,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER,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_sdio.c_ath6kl_sdio_alloc_prep_scat_req.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath6kl_sdio_alloc_prep_scat_req, %function
ath6kl_sdio_alloc_prep_scat_req:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r2
	subs	r6, r3, #0
	ldrne	r3, .L20
	ldrne	r2, .L20+4
	lsl	r9, r1, #2
	ldrne	r3, [r3]
	add	fp, r9, #16
	ldrne	r9, [r2]
	mov	r7, r0
	addne	r9, r9, r3, lsl #1
	cmp	r10, #0
	movgt	r5, #0
	ldrgt	r8, .L20+8
	bgt	.L4
	b	.L11
.L19:
	bl	kzalloc
	cmp	r0, #0
	beq	.L16
	bl	L1_CACHE_ALIGN
	str	r0, [r4, #8]
.L9:
	mov	r0, r7
	bl	ath6kl_sdio_alloc_busreq
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L18
	str	r4, [r0]
	mov	r1, r4
	str	r0, [r4, #4]
	str	r6, [r4]
	ldr	r0, [r7]
	bl	hif_scatter_req_add
	cmp	r10, r5
	beq	.L11
.L4:
	mov	r0, fp
	ldr	r1, [r8]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L15
	cmp	r6, #0
	mov	r0, r9
	ldr	r1, [r8]
	bne	.L19
	bl	kzalloc
	cmp	r0, #0
	str	r0, [r4, #12]
	bne	.L9
.L16:
	mov	r0, r4
	bl	kfree
.L15:
	ldr	r3, .L20+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r0, [r4, #12]
	bl	kfree
	ldr	r0, [r4, #8]
	bl	kfree
	mov	r0, r4
	bl	kfree
	b	.L15
.L21:
	.align	2
.L20:
	.word	L1_CACHE_BYTES
	.word	ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	ath6kl_sdio_alloc_prep_scat_req, .-ath6kl_sdio_alloc_prep_scat_req
	.comm	L1_CACHE_BYTES,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
