	.file	"extr_efa_verbs.c_efa_vmalloc_buf_to_sg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	efa_vmalloc_buf_to_sg, @function
efa_vmalloc_buf_to_sg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	mov	esi, 4
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, r13d
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	call	kcalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	mov	esi, r13d
	mov	rdi, rax
	call	sg_init_table@PLT
	test	r13d, r13d
	jle	.L1
	lea	eax, -1[r13]
	mov	rbx, r12
	lea	r13, 4[r12+rax*4]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR PAGE_SIZE[rip]
	mov	rdi, rbx
	xor	ecx, ecx
	add	rbx, 4
	call	sg_set_page@PLT
	movsx	rax, DWORD PTR PAGE_SIZE[rip]
	and	rax, -4
	add	rbp, rax
	cmp	rbx, r13
	je	.L1
.L4:
	mov	rdi, rbp
	call	vmalloc_to_page@PLT
	mov	rsi, rax
	test	rax, rax
	jne	.L3
	mov	rdi, r12
	xor	r12d, r12d
	call	kfree@PLT
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	efa_vmalloc_buf_to_sg, .-efa_vmalloc_buf_to_sg
	.comm	PAGE_SIZE,4,4
	.comm	GFP_KERNEL,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_efa_verbs.c_efa_vmalloc_buf_to_sg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	efa_vmalloc_buf_to_sg, %function
efa_vmalloc_buf_to_sg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L11
	mov	r8, r1
	mov	r4, r0
	ldr	r2, [r3]
	mov	r0, r1
	sub	sp, sp, #12
	mov	r1, #4
	bl	kcalloc
	subs	r9, r0, #0
	beq	.L1
	mov	r1, r8
	bl	sg_init_table
	cmp	r8, #0
	ble	.L1
	mov	r6, r9
	mov	r5, #0
	ldr	r7, .L11+4
	b	.L4
.L3:
	mov	r3, #0
	mov	r0, r6
	ldr	r2, [r7]
	bl	sg_set_page
	ldr	r3, [r7]
	cmp	r8, r5
	bic	r3, r3, #3
	add	r6, r6, #4
	add	r4, r4, r3
	beq	.L1
.L4:
	mov	r0, r4
	bl	vmalloc_to_page
	subs	r1, r0, #0
	add	r5, r5, #1
	bne	.L3
	mov	r0, r9
	str	r1, [sp, #4]
	bl	kfree
	ldr	r1, [sp, #4]
	mov	r9, r1
.L1:
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	.align	2
.L11:
	.word	GFP_KERNEL
	.word	PAGE_SIZE
	.size	efa_vmalloc_buf_to_sg, .-efa_vmalloc_buf_to_sg
	.comm	PAGE_SIZE,4,4
	.comm	GFP_KERNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
