	.file	"extr_ubd_kern.c_do_ubd_request.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"write to io thread failed, errno = %d\n"
	.text
	.p2align 4
	.type	do_ubd_request, @function
do_ubd_request:
.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
	mov	r13, rdi
	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, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r12, rsp
.L11:
	mov	r14, QWORD PTR 0[r13]
	cmp	QWORD PTR [r14], 0
	jne	.L2
	mov	rdi, r13
	call	blk_fetch_request@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L1
	mov	QWORD PTR 16[r14], rax
	mov	rdx, QWORD PTR 32[r14]
	mov	rdi, r13
	mov	QWORD PTR 8[r14], 0
	call	blk_rq_map_sg@PLT
	mov	QWORD PTR [r14], rax
.L2:
	mov	rbp, QWORD PTR 16[r14]
	mov	rdi, rbp
	call	blk_rq_pos@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR 8[r14]
	cmp	rax, QWORD PTR [r14]
	jl	.L10
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r15
	call	sg_page@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rdx, rbx
	mov	ecx, DWORD PTR 4[r15]
	mov	r8d, DWORD PTR [r15]
	sal	rdx, 9
	mov	rdi, rbp
	mov	r9d, eax
	call	prepare_request@PLT
	mov	eax, DWORD PTR [r15]
	mov	edx, 8
	mov	rsi, r12
	mov	edi, DWORD PTR thread_fd[rip]
	sar	eax, 9
	cdqe
	add	rbx, rax
	call	os_write_file@PLT
	cmp	eax, 8
	jne	.L25
	mov	rax, QWORD PTR 8[r14]
	add	rax, 1
	mov	QWORD PTR 8[r14], rax
	cmp	rax, QWORD PTR [r14]
	jge	.L4
.L10:
	mov	rdx, QWORD PTR 32[r14]
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	mov	edi, 4
	lea	r15, [rdx+rax*8]
	call	kmalloc@PLT
	mov	QWORD PTR [rsp], rax
	test	rax, rax
	jne	.L5
	add	r14, 24
	mov	rdi, r14
	call	list_empty@PLT
	test	rax, rax
	jne	.L26
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 24
	.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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	QWORD PTR [r14], 0
	mov	QWORD PTR 16[r14], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	mov	ebx, eax
	add	ebx, DWORD PTR EAGAIN[rip]
	je	.L8
	neg	eax
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	printk@PLT
.L9:
	mov	rdi, QWORD PTR [rsp]
	call	kfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rsi, restart[rip]
	mov	rdi, r14
	call	list_add@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	add	r14, 24
	mov	rdi, r14
	call	list_empty@PLT
	test	rax, rax
	je	.L9
	lea	rsi, restart[rip]
	mov	rdi, r14
	call	list_add@PLT
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	do_ubd_request, .-do_ubd_request
	.comm	thread_fd,4,4
	.comm	restart,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	EAGAIN,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_ubd_kern.c_do_ubd_request.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"write to io thread failed, errno = %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_ubd_request, %function
do_ubd_request:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L28
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	str	r0, [sp, #20]
.L11:
	ldr	r5, [sp, #20]
	ldr	r6, [r5]
	ldr	r4, [r6]
	cmp	r4, #0
	bne	.L2
	mov	r0, r5
	bl	blk_fetch_request
	subs	r1, r0, #0
	beq	.L1
	mov	r0, r5
	ldr	r2, [r6, #16]
	str	r1, [r6, #8]
	str	r4, [r6, #4]
	bl	blk_rq_map_sg
	str	r0, [r6]
.L2:
	ldr	r8, [r6, #8]
	mov	r0, r8
	bl	blk_rq_pos
	ldm	r6, {r3, r4}
	cmp	r4, r3
	mov	r5, r0
	blt	.L10
	b	.L4
.L5:
	ldr	r9, [r0, #4]
	ldr	r10, [r7, r4, lsl #3]
	bl	sg_page
	asr	r3, r5, #31
	lsl	r3, r3, #9
	orr	r3, r3, r5, lsr #23
	lsl	r2, r5, #9
	mov	r1, fp
	str	r0, [sp, #8]
	stm	sp, {r9, r10}
	mov	r0, r8
	bl	prepare_request
	ldr	r0, .L28+4
	ldr	r3, [r7, r4, lsl #3]
	mov	r2, #4
	ldr	r0, [r0]
	add	r1, sp, #24
	add	r5, r5, r3, asr #9
	bl	os_write_file
	cmp	r0, #4
	bne	.L25
	ldm	r6, {r3, r4}
	add	r4, r4, #1
	cmp	r4, r3
	str	r4, [r6, #4]
	bge	.L4
.L10:
	ldr	r3, .L28+8
	mov	r0, #4
	ldr	r1, [r3]
	ldr	r7, [r6, #16]
	bl	kmalloc
	cmp	r0, #0
	mov	fp, r0
	str	r0, [sp, #24]
	add	r0, r7, r4, lsl #3
	bne	.L5
	add	r6, r6, #12
	mov	r0, r6
	bl	list_empty
	cmp	r0, #0
	bne	.L26
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r3, #0
	str	r3, [r6]
	str	r3, [r6, #8]
	b	.L11
.L25:
	ldr	r3, .L28+12
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L8
	rsb	r1, r0, #0
	ldr	r0, .L28+16
	bl	printk
.L9:
	ldr	r0, [sp, #24]
	bl	kfree
	b	.L1
.L26:
	mov	r0, r6
	ldr	r1, .L28+20
	bl	list_add
	b	.L1
.L8:
	add	r6, r6, #12
	mov	r0, r6
	bl	list_empty
	cmp	r0, #0
	beq	.L9
	mov	r0, r6
	ldr	r1, .L28+20
	bl	list_add
	b	.L9
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	thread_fd
	.word	GFP_ATOMIC
	.word	EAGAIN
	.word	.LC0
	.word	restart
	.size	do_ubd_request, .-do_ubd_request
	.comm	thread_fd,4,4
	.comm	restart,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
