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