	.file	"extr_lpfc_bsg.c_diag_cmd_data_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	diag_cmd_data_alloc, @function
diag_cmd_data_alloc:
.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, 40
	.cfi_def_cfa_offset 96
	mov	r15, QWORD PTR [rdi]
	mov	QWORD PTR 24[rsp], rdi
	mov	DWORD PTR 20[rsp], ecx
	test	edx, edx
	je	.L8
	mov	DWORD PTR 16[rsp], 0
	mov	rbx, rsi
	mov	r12d, edx
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, 24[r13]
	call	list_add_tail@PLT
.L3:
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	lea	rdx, 8[r14]
	mov	esi, ebp
	mov	rdi, r15
	call	dma_alloc_coherent@PLT
	mov	QWORD PTR 16[r14], rax
	test	rax, rax
	je	.L2
	mov	edx, DWORD PTR 20[rsp]
	mov	DWORD PTR [r14], ebp
	test	edx, edx
	je	.L4
	mov	QWORD PTR 16[rbx], 0
.L5:
	mov	edi, DWORD PTR 8[r14]
	add	rbx, 40
	call	putPaddrLow@PLT
	mov	rdi, rax
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR 8[r14]
	mov	QWORD PTR -8[rbx], rax
	call	putPaddrHigh@PLT
	mov	rdi, rax
	call	le32_to_cpu@PLT
	mov	rdi, QWORD PTR -40[rbx]
	mov	QWORD PTR -16[rbx], rax
	movsx	rax, ebp
	mov	QWORD PTR -32[rbx], rax
	call	le32_to_cpu@PLT
	add	DWORD PTR 16[rsp], 1
	mov	QWORD PTR -40[rbx], rax
	sub	r12d, ebp
	je	.L19
.L6:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 32
	cmp	DWORD PTR BUF_SZ_4K[rip], r12d
	mov	ebp, r12d
	cmovle	ebp, DWORD PTR BUF_SZ_4K[rip]
	call	kmalloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L2
	lea	rdi, 24[rax]
	mov	QWORD PTR 8[rsp], rdi
	call	INIT_LIST_HEAD@PLT
	test	r13, r13
	jne	.L20
	mov	r13, r14
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, ebp
	xor	esi, esi
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR BUFF_TYPE_BDE_64I[rip]
	mov	QWORD PTR 16[rbx], rax
	jmp	.L5
.L8:
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, QWORD PTR 24[rsp]
	mov	rsi, r13
	xor	r13d, r13d
	call	diag_cmd_data_free@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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	eax, DWORD PTR 16[rsp]
	mov	DWORD PTR 4[r13], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	diag_cmd_data_alloc, .-diag_cmd_data_alloc
	.comm	GFP_KERNEL,4,4
	.comm	BUF_SZ_4K,4,4
	.comm	BUFF_TYPE_BDE_64I,8,8
	.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_lpfc_bsg.c_diag_cmd_data_alloc.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	diag_cmd_data_alloc, %function
diag_cmd_data_alloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	str	r3, [sp, #4]
	ldr	r3, [r0]
	subs	r7, r2, #0
	str	r0, [sp, #12]
	str	r3, [sp, #8]
	beq	.L8
	mov	r9, #0
	ldr	fp, .L23
	mov	r8, r9
	ldr	r10, .L23+4
	add	r6, r1, #20
	b	.L6
.L22:
	mov	r3, #0
	str	r3, [r6, #-12]
.L5:
	ldr	r0, [r4, #8]
	bl	putPaddrLow
	bl	le32_to_cpu
	mov	r3, r0
	ldr	r0, [r4, #8]
	str	r3, [r6, #-4]
	bl	putPaddrHigh
	bl	le32_to_cpu
	str	r5, [r6, #-16]
	str	r0, [r6, #-8]
	ldr	r0, [r6, #-20]
	bl	le32_to_cpu
	subs	r7, r7, r5
	str	r0, [r6, #-20]
	add	r9, r9, #1
	add	r6, r6, #20
	beq	.L21
.L6:
	ldr	r5, [fp]
	mov	r0, #20
	cmp	r7, r5
	ldr	r1, [r10]
	movlt	r5, r7
	bl	kmalloc
	subs	r4, r0, #0
	add	r3, r4, #16
	beq	.L2
	mov	r0, r3
	str	r3, [sp]
	bl	INIT_LIST_HEAD
	cmp	r8, #0
	add	r1, r8, #16
	moveq	r8, r4
	beq	.L3
	ldr	r3, [sp]
	mov	r0, r3
	bl	list_add_tail
.L3:
	mov	r1, r5
	ldr	r3, [r10]
	ldr	r0, [sp, #8]
	add	r2, r4, #8
	bl	dma_alloc_coherent
	cmp	r0, #0
	str	r0, [r4, #12]
	beq	.L2
	ldr	r3, [sp, #4]
	str	r5, [r4]
	cmp	r3, #0
	bne	.L22
	mov	r2, r5
	ldr	r1, [sp, #4]
	bl	memset
	ldr	r3, .L23+8
	ldr	r3, [r3]
	str	r3, [r6, #-12]
	b	.L5
.L8:
	mov	r8, r7
.L2:
	mov	r1, r8
	mov	r8, #0
	ldr	r0, [sp, #12]
	bl	diag_cmd_data_free
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	mov	r0, r8
	str	r9, [r8, #4]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	.align	2
.L23:
	.word	BUF_SZ_4K
	.word	GFP_KERNEL
	.word	BUFF_TYPE_BDE_64I
	.size	diag_cmd_data_alloc, .-diag_cmd_data_alloc
	.comm	GFP_KERNEL,4,4
	.comm	BUF_SZ_4K,4,4
	.comm	BUFF_TYPE_BDE_64I,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
