	.file	"extr_ctl_backend_ramdisk.c_ctl_backend_ramdisk_move_done.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ctl_backend_ramdisk_move_done\n"
	.text
	.p2align 4
	.type	ctl_backend_ramdisk_move_done, @function
ctl_backend_ramdisk_move_done:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	CTL_BACKEND_LUN@PLT
	lea	rdi, .LC0[rip]
	mov	r12, QWORD PTR [rax]
	call	CTL_DEBUG_PRINT@PLT
	add	DWORD PTR 20[rbp], 1
	cmp	QWORD PTR 0[rbp], 0
	jle	.L2
	mov	edi, DWORD PTR 28[rbp]
	mov	esi, DWORD PTR M_RAMDISK[rip]
	call	free@PLT
.L2:
	mov	rax, QWORD PTR 16[rbp]
	add	DWORD PTR 24[rbp], eax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR CTL_FLAG_ABORT[rip], eax
	jne	.L4
	mov	rdx, QWORD PTR 8[rbp]
	mov	eax, DWORD PTR 16[rbp]
	mov	ecx, DWORD PTR CTL_STATUS_NONE[rip]
	and	eax, DWORD PTR CTL_STATUS_MASK[rip]
	test	rdx, rdx
	je	.L5
	cmp	eax, ecx
	je	.L6
	cmp	DWORD PTR CTL_SUCCESS[rip], eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	call	ctl_data_submit_done@PLT
.L12:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmp	eax, ecx
	jne	.L4
	mov	rdi, rbp
	call	ARGS@PLT
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR CTL_LLF_COMPARE[rip], eax
	je	.L11
	mov	rdi, rbp
	call	ctl_backend_ramdisk_cmp@PLT
	test	rax, rax
	jne	.L4
.L11:
	mov	rdi, rbp
	call	ARGS@PLT
	mov	rdi, rbp
	mov	rbx, QWORD PTR 8[rax]
	call	PRIV@PLT
	cmp	rbx, QWORD PTR [rax]
	jg	.L16
	mov	rdi, rbp
	call	ctl_set_success@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, 1
	mov	rdi, rbp
	call	ctl_set_internal_failure@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	lea	r13, 8[r12]
	mov	rdi, r13
	call	mtx_lock@PLT
	mov	edx, DWORD PTR links[rip]
	mov	rsi, rbp
	lea	rdi, 12[r12]
	call	STAILQ_INSERT_TAIL@PLT
	mov	rdi, r13
	call	mtx_unlock@PLT
	mov	edi, DWORD PTR 4[r12]
	mov	rsi, r12
	call	taskqueue_enqueue@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	ctl_backend_ramdisk_move_done, .-ctl_backend_ramdisk_move_done
	.comm	links,4,4
	.comm	M_RAMDISK,4,4
	.comm	CTL_SUCCESS,4,4
	.comm	CTL_STATUS_NONE,4,4
	.comm	CTL_STATUS_MASK,4,4
	.comm	CTL_LLF_COMPARE,4,4
	.comm	CTL_FLAG_DATA_OUT,4,4
	.comm	CTL_FLAG_DATA_MASK,4,4
	.comm	CTL_FLAG_ABORT,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_ctl_backend_ramdisk.c_ctl_backend_ramdisk_move_done.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ctl_backend_ramdisk_move_done\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctl_backend_ramdisk_move_done, %function
ctl_backend_ramdisk_move_done:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	CTL_BACKEND_LUN
	mov	r3, r0
	ldr	r0, .L17
	ldr	r5, [r3]
	bl	CTL_DEBUG_PRINT
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
	add	r3, r3, #1
	cmp	r2, #0
	str	r3, [r4, #12]
	ble	.L2
	ldr	r3, .L17+4
	ldr	r0, [r4, #16]
	ldr	r1, [r3]
	bl	free
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
.L2:
	ldr	r0, .L17+8
	ldr	r1, [r4, #8]
	ldr	r0, [r0]
	add	r3, r1, r3
	tst	r2, r0
	str	r3, [r4, #12]
	bne	.L4
	ldr	r3, .L17+12
	ldr	r2, [r4, #4]
	ldr	r0, [r3]
	ldr	r3, .L17+16
	cmp	r2, #0
	ldr	r3, [r3]
	and	r1, r1, r0
	beq	.L5
	cmp	r3, r1
	beq	.L6
	ldr	r3, .L17+20
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L6
.L4:
	mov	r0, r4
	bl	ctl_data_submit_done
.L12:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L5:
	cmp	r3, r1
	bne	.L4
	mov	r0, r4
	bl	ARGS
	ldr	r3, .L17+24
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L11
	mov	r0, r4
	bl	ctl_backend_ramdisk_cmp
	cmp	r0, #0
	bne	.L4
.L11:
	mov	r0, r4
	bl	ARGS
	mov	r3, r0
	mov	r0, r4
	ldr	r6, [r3, #4]
	bl	PRIV
	ldr	r3, [r0]
	cmp	r6, r3
	bgt	.L16
	mov	r0, r4
	bl	ctl_set_success
	b	.L4
.L6:
	mov	r1, #1
	mov	r0, r4
	bl	ctl_set_internal_failure
	b	.L4
.L16:
	add	r6, r5, #8
	mov	r0, r6
	bl	mtx_lock
	ldr	r3, .L17+28
	mov	r1, r4
	ldr	r2, [r3]
	add	r0, r5, #12
	bl	STAILQ_INSERT_TAIL
	mov	r0, r6
	bl	mtx_unlock
	mov	r1, r5
	ldr	r0, [r5, #4]
	bl	taskqueue_enqueue
	b	.L12
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	M_RAMDISK
	.word	CTL_FLAG_ABORT
	.word	CTL_STATUS_MASK
	.word	CTL_STATUS_NONE
	.word	CTL_SUCCESS
	.word	CTL_LLF_COMPARE
	.word	links
	.size	ctl_backend_ramdisk_move_done, .-ctl_backend_ramdisk_move_done
	.comm	links,4,4
	.comm	M_RAMDISK,4,4
	.comm	CTL_SUCCESS,4,4
	.comm	CTL_STATUS_NONE,4,4
	.comm	CTL_STATUS_MASK,4,4
	.comm	CTL_LLF_COMPARE,4,4
	.comm	CTL_FLAG_DATA_OUT,4,4
	.comm	CTL_FLAG_DATA_MASK,4,4
	.comm	CTL_FLAG_ABORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
