	.file	"extr_ivtv-udma.c_ivtv_udma_fill_sg_list.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ivtv_udma_fill_sg_list
	.type	ivtv_udma_fill_sg_list, @function
ivtv_udma_fill_sg_list:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	eax, edx
	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	QWORD PTR [rsp], rsi
	test	edx, edx
	js	.L1
	mov	ecx, DWORD PTR 4[rsi]
	mov	r13d, DWORD PTR [rsi]
	test	ecx, ecx
	jle	.L1
	movsx	rbx, edx
	add	eax, 1
	mov	r14, rdi
	xor	r15d, r15d
	mov	DWORD PTR 28[rsp], eax
	sal	rbx, 2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, QWORD PTR 16[r14]
	add	rdx, rbp
	cmp	QWORD PTR [rdx], 0
	je	.L6
.L8:
	xor	r11d, r11d
	mov	rdi, r11
	call	local_irq_save@PLT
	mov	rax, QWORD PTR [r14]
	mov	rdi, QWORD PTR [rax+rbp]
	call	kmap_atomic@PLT
	movsx	rdx, r13d
	lea	r10, [rax+rdx]
	mov	rax, QWORD PTR 16[r14]
	mov	QWORD PTR 16[rsp], rdx
	mov	QWORD PTR 8[rsp], r10
	mov	rdi, QWORD PTR [rax+rbp]
	call	page_address@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	r10, QWORD PTR 8[rsp]
	lea	rdi, [rdx+rax]
	mov	rsi, r10
	mov	edx, r12d
	call	memcpy@PLT
	mov	r10, QWORD PTR 8[rsp]
	mov	rdi, r10
	call	kunmap_atomic@PLT
	xor	r11d, r11d
	mov	rdi, r11
	call	local_irq_restore@PLT
	mov	rax, QWORD PTR 16[r14]
	mov	rsi, QWORD PTR [rax+rbp]
.L15:
	mov	rdi, QWORD PTR 8[r14]
	mov	ecx, r13d
	mov	edx, r12d
	xor	r13d, r13d
	add	rdi, rbx
	add	rbx, 4
	call	sg_set_page@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	eax, DWORD PTR 28[rsp]
	mov	ecx, DWORD PTR 4[rsi]
	add	eax, r15d
	add	r15d, 1
	cmp	ecx, r15d
	jle	.L1
.L9:
	mov	r12d, DWORD PTR PAGE_SIZE[rip]
	sub	ecx, 1
	sub	r12d, r13d
	cmp	ecx, r15d
	jne	.L4
	mov	rax, QWORD PTR [rsp]
	mov	r12d, DWORD PTR 8[rax]
.L4:
	mov	rax, QWORD PTR [r14]
	lea	rbp, [rbx+rbx]
	mov	rdi, QWORD PTR [rax+rbx*2]
	call	PageHighMem@PLT
	test	rax, rax
	jne	.L17
	mov	rax, QWORD PTR [r14]
	mov	rsi, QWORD PTR [rax+rbx*2]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	mov	QWORD PTR 8[rsp], rdx
	call	alloc_page@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR 16[r14]
	cmp	QWORD PTR [rax+rbp], 0
	jne	.L8
	mov	eax, -1
.L1:
	add	rsp, 40
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	ivtv_udma_fill_sg_list, .-ivtv_udma_fill_sg_list
	.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_ivtv-udma.c_ivtv_udma_fill_sg_list.c"
	.text
	.align	2
	.global	ivtv_udma_fill_sg_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivtv_udma_fill_sg_list, %function
ivtv_udma_fill_sg_list:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r4, r2, #0
	blt	.L11
	ldr	r3, [r1, #4]
	mov	r10, r1
	cmp	r3, #0
	ldr	r8, [r1]
	ble	.L11
	mov	r5, r0
	mov	r7, #0
	b	.L9
.L16:
	ldr	fp, [r5, #8]
	ldr	r3, [fp, r4, lsl #2]
	cmp	r3, #0
	beq	.L6
.L8:
	mov	r3, #0
	mov	r0, r3
	bl	local_irq_save
	ldr	r2, [r5]
	ldr	r0, [r2, r6]
	bl	kmap_atomic
	ldr	r2, [r5, #8]
	add	fp, r0, r8
	ldr	r0, [r2, r6]
	bl	page_address
	mov	r2, r9
	mov	r1, fp
	add	r0, r0, r8
	bl	memcpy
	mov	r0, fp
	bl	kunmap_atomic
	mov	r3, #0
	mov	r0, r3
	bl	local_irq_restore
	ldmib	r5, {r0, r1}
	mov	r3, r8
	mov	r2, r9
	ldr	r1, [r1, r6]
	add	r0, r0, r6
	bl	sg_set_page
.L7:
	ldr	r3, [r10, #4]
	add	r7, r7, #1
	cmp	r3, r7
	mov	r8, #0
	add	r4, r4, #1
	ble	.L11
.L9:
	sub	r3, r3, #1
	cmp	r3, r7
	ldrne	r3, .L17
	ldreq	r9, [r10, #8]
	ldrne	r9, [r3]
	ldr	r3, [r5]
	subne	r9, r9, r8
	ldr	r0, [r3, r4, lsl #2]
	bl	PageHighMem
	cmp	r0, #0
	lsl	r6, r4, #2
	bne	.L16
	ldr	r1, [r5]
	ldr	r0, [r5, #4]
	mov	r3, r8
	mov	r2, r9
	ldr	r1, [r1, r4, lsl #2]
	add	r0, r0, r6
	bl	sg_set_page
	b	.L7
.L6:
	ldr	r3, .L17+4
	ldr	r0, [r3]
	bl	alloc_page
	ldr	r3, [r5, #8]
	str	r0, [fp, r6]
	ldr	r3, [r3, r6]
	cmp	r3, #0
	bne	.L8
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	.align	2
.L17:
	.word	PAGE_SIZE
	.word	GFP_KERNEL
	.size	ivtv_udma_fill_sg_list, .-ivtv_udma_fill_sg_list
	.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
