	.file	"extr_ubd_kern.c_do_io.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"do_io - lseek failed : err = %d\n"
	.align 8
.LC1:
	.string	"do_io - read failed, err = %d fd = %d\n"
	.align 8
.LC2:
	.string	"do_io - write failed err = %d fd = %d\n"
	.text
	.p2align 4
	.type	do_io, @function
do_io:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 56[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xor	r13d, r13d
	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	eax, DWORD PTR [rdi]
	cdq
	idiv	DWORD PTR 4[rdi]
	mov	r12d, eax
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rsi, r15
	mov	edi, r13d
	mov	ebx, r13d
	call	ubd_test_bit@PLT
	mov	ebp, eax
	xor	eax, eax
	cmp	r13d, r12d
	jl	.L2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	add	ebx, 1
	cmp	r12d, ebx
	je	.L20
.L2:
	mov	rsi, r15
	mov	edi, ebx
	call	ubd_test_bit@PLT
	cmp	eax, ebp
	je	.L4
	mov	eax, ebx
	sub	eax, r13d
.L3:
	movsx	rcx, ebp
	mov	ebp, DWORD PTR 4[r14]
	mov	edx, r13d
	mov	rdi, QWORD PTR 40[r14]
	mov	rsi, QWORD PTR 48[r14]
	mov	QWORD PTR 16[rsp], rcx
	imul	edx, ebp
	add	rsi, QWORD PTR [rdi+rcx*8]
	imul	ebp, eax
	movsx	rax, edx
	lea	rdx, 0[0+rcx*4]
	mov	DWORD PTR 28[rsp], ebp
	movsx	r13, ebp
	mov	rbp, QWORD PTR 8[r14]
	add	rsi, rax
	mov	QWORD PTR 8[rsp], rdx
	add	rbp, rax
	mov	rax, QWORD PTR 32[r14]
	mov	edi, DWORD PTR [rax+rcx*4]
	call	os_seek_file@PLT
	mov	rcx, QWORD PTR 16[rsp]
	test	eax, eax
	js	.L21
	mov	rax, QWORD PTR 32[r14]
	mov	edi, DWORD PTR [rax+rcx*4]
	mov	rax, QWORD PTR UBD_READ[rip]
	cmp	QWORD PTR 24[r14], rax
	je	.L22
	mov	rdx, r13
	mov	rsi, rbp
	call	os_write_file@PLT
	cmp	DWORD PTR 28[rsp], eax
	jne	.L23
.L13:
	cmp	r12d, ebx
	jle	.L24
.L15:
	mov	r13d, ebx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, r12d
	mov	ebx, r12d
	sub	eax, r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L22:
	xor	ecx, ecx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	movsx	rcx, eax
	cmp	rcx, r13
	jnb	.L13
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR 32[r14]
	mov	rdx, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR [rax+rdx]
.L11:
	add	rbp, rcx
	sub	r13, rcx
	mov	rdx, r13
	mov	rsi, rbp
	call	os_read_file@PLT
	test	eax, eax
	jns	.L8
	mov	rdx, QWORD PTR 32[r14]
	mov	rcx, QWORD PTR 8[rsp]
	neg	eax
	lea	rdi, .LC1[rip]
	mov	esi, eax
	xor	eax, eax
	mov	edx, DWORD PTR [rdx+rcx]
	call	printk@PLT
	mov	DWORD PTR 16[r14], 1
	add	rsp, 40
	.cfi_remember_state
	.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
.L10:
	.cfi_restore_state
	xor	esi, esi
	mov	rdx, r13
	mov	rdi, rbp
	call	memset@PLT
	cmp	r12d, ebx
	jg	.L15
.L24:
	mov	rdi, r14
	call	update_bitmap@PLT
	mov	DWORD PTR 16[r14], eax
	add	rsp, 40
	.cfi_remember_state
	.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
.L21:
	.cfi_restore_state
	neg	eax
	lea	rdi, .LC0[rip]
	mov	esi, eax
	xor	eax, eax
	call	printk@PLT
	mov	DWORD PTR 16[r14], 1
	add	rsp, 40
	.cfi_remember_state
	.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
.L23:
	.cfi_restore_state
	mov	rdx, QWORD PTR 32[r14]
	mov	rcx, QWORD PTR 8[rsp]
	neg	eax
	lea	rdi, .LC2[rip]
	mov	esi, eax
	xor	eax, eax
	mov	edx, DWORD PTR [rdx+rcx]
	call	printk@PLT
	mov	DWORD PTR 16[r14], 1
	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	do_io, .-do_io
	.comm	UBD_READ,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_ubd_kern.c_do_io.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"do_io - lseek failed : err = %d\012\000"
	.align	2
.LC1:
	.ascii	"do_io - read failed, err = %d fd = %d\012\000"
	.align	2
.LC2:
	.ascii	"do_io - write failed err = %d fd = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_io, %function
do_io:
	@ 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	r8, r0
	ldr	r1, [r0, #4]
	mov	r7, r0
	ldr	r0, [r8], #32
	bl	__aeabi_idiv
	mov	fp, #0
	mov	r6, r0
.L13:
	mov	r1, r8
	mov	r0, fp
	bl	ubd_test_bit
	cmp	fp, r6
	mov	r4, fp
	mov	r5, r0
	movge	r3, #0
	blt	.L2
	b	.L3
.L4:
	add	r4, r4, #1
	cmp	r6, r4
	beq	.L19
.L2:
	mov	r1, r8
	mov	r0, r4
	bl	ubd_test_bit
	cmp	r0, r5
	beq	.L4
	sub	r3, r4, fp
.L3:
	ldr	r2, [r7, #4]
	ldr	r1, [r7, #24]
	mul	fp, r2, fp
	ldr	ip, [r7, #28]
	ldr	r1, [r1, r5, lsl #2]
	ldr	r0, [r7, #20]
	add	r1, r1, ip
	ldr	ip, [r7, #8]
	add	r1, r1, fp
	ldr	r0, [r0, r5, lsl #2]
	mul	r10, r3, r2
	add	fp, ip, fp
	bl	os_seek_file
	cmp	r0, #0
	lsl	r9, r5, #2
	blt	.L20
	ldr	r3, .L24
	ldr	r0, [r7, #16]
	ldr	r1, [r3]
	ldr	r3, [r7, #20]
	cmp	r0, r1
	ldr	r0, [r3, r5, lsl #2]
	beq	.L21
	mov	r1, fp
	mov	r2, r10
	bl	os_write_file
	cmp	r10, r0
	bne	.L22
.L12:
	cmp	r4, r6
	bge	.L23
.L15:
	mov	fp, r4
	b	.L13
.L19:
	mov	r4, r6
	sub	r3, r6, fp
	b	.L3
.L21:
	mov	r3, #0
	b	.L10
.L8:
	cmp	r3, #0
	cmpne	r3, r10
	movcc	r1, #1
	movcs	r1, #0
	bcs	.L9
	ldr	r1, [r7, #20]
	ldr	r0, [r1, r9]
.L10:
	add	fp, fp, r3
	sub	r10, r10, r3
	mov	r2, r10
	mov	r1, fp
	bl	os_read_file
	subs	r3, r0, #0
	bge	.L8
	ldr	r2, [r7, #20]
	rsb	r1, r3, #0
	ldr	r2, [r2, r9]
	ldr	r0, .L24+4
	bl	printk
	mov	r3, #1
	str	r3, [r7, #12]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	cmp	r3, r10
	bcs	.L12
	sub	r2, r10, r3
	add	r0, fp, r3
	bl	memset
	cmp	r4, r6
	blt	.L15
.L23:
	mov	r0, r7
	bl	update_bitmap
	str	r0, [r7, #12]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	rsb	r1, r0, #0
	ldr	r0, .L24+8
	bl	printk
	mov	r3, #1
	str	r3, [r7, #12]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r3, [r7, #20]
	rsb	r1, r0, #0
	ldr	r2, [r3, r9]
	ldr	r0, .L24+12
	bl	printk
	mov	r3, #1
	str	r3, [r7, #12]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	.align	2
.L24:
	.word	UBD_READ
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.size	do_io, .-do_io
	.comm	UBD_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
