	.file	"extr_esas2r_int.c_esas2r_complete_request.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	esas2r_complete_request
	.type	esas2r_complete_request, @function
esas2r_complete_request:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 16[rsi]
	mov	rdx, QWORD PTR VDA_FUNC_FLASH[rip]
	cmp	QWORD PTR [rax], rdx
	je	.L15
.L2:
	mov	rax, QWORD PTR 24[rbp]
	test	rax, rax
	je	.L3
	mov	rsi, rbp
	mov	rdi, r12
	call	rax
	mov	rax, QWORD PTR RS_PENDING[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L16
.L3:
	mov	rax, QWORD PTR 16[rbp]
	xor	edi, edi
	mov	rcx, QWORD PTR VDA_FUNC_SCSI[rip]
	cmp	QWORD PTR [rax], rcx
	sete	dil
	call	likely@PLT
	test	rax, rax
	jne	.L17
.L5:
	mov	rax, QWORD PTR 8[rbp]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rcx, QWORD PTR VDA_FLASH_COMMIT[rip]
	cmp	QWORD PTR 8[rax], rcx
	jne	.L2
	mov	rsi, rdi
	mov	edi, DWORD PTR AF_FLASHING[rip]
	call	clear_bit@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	xor	edi, edi
	mov	rax, QWORD PTR RS_SUCCESS[rip]
	cmp	QWORD PTR 0[rbp], rax
	setne	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L5
	mov	rsi, rbp
	mov	rdi, r12
	call	esas2r_check_req_rsp_sense@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	esas2r_log_request_failure@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	esas2r_start_request@PLT
	.cfi_endproc
.LFE0:
	.size	esas2r_complete_request, .-esas2r_complete_request
	.comm	VDA_FUNC_SCSI,8,8
	.comm	VDA_FUNC_FLASH,8,8
	.comm	VDA_FLASH_COMMIT,8,8
	.comm	RS_SUCCESS,8,8
	.comm	RS_PENDING,8,8
	.comm	AF_FLASHING,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_esas2r_int.c_esas2r_complete_request.c"
	.text
	.align	2
	.global	esas2r_complete_request
	.syntax unified
	.arm
	.fpu softvfp
	.type	esas2r_complete_request, %function
esas2r_complete_request:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1, #8]
	ldr	r2, .L18
	push	{r4, r5, r6, lr}
	ldr	r2, [r2]
	mov	r4, r1
	ldr	r1, [r3]
	mov	r5, r0
	cmp	r1, r2
	beq	.L15
.L2:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L3
	mov	r1, r4
	mov	r0, r5
	blx	r3
	ldr	r3, .L18+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L16
.L3:
	ldr	r2, [r4, #8]
	ldr	r3, .L18+8
	ldr	r0, [r2]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	likely
	cmp	r0, #0
	bne	.L17
.L5:
	mov	r0, r5
	mov	r1, r4
	ldr	r3, [r4, #4]
	pop	{r4, r5, r6, lr}
	bx	r3
.L15:
	ldr	r1, .L18+12
	ldr	r2, [r3, #4]
	ldr	r3, [r1]
	cmp	r2, r3
	bne	.L2
	ldr	r3, .L18+16
	mov	r1, r0
	ldr	r0, [r3]
	bl	clear_bit
	b	.L2
.L17:
	ldr	r3, .L18+20
	ldr	r0, [r4]
	ldr	r3, [r3]
	subs	r0, r0, r3
	movne	r0, #1
	bl	unlikely
	cmp	r0, #0
	beq	.L5
	mov	r1, r4
	mov	r0, r5
	bl	esas2r_check_req_rsp_sense
	mov	r1, r4
	mov	r0, r5
	bl	esas2r_log_request_failure
	b	.L5
.L16:
	mov	r1, r4
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	esas2r_start_request
.L19:
	.align	2
.L18:
	.word	VDA_FUNC_FLASH
	.word	RS_PENDING
	.word	VDA_FUNC_SCSI
	.word	VDA_FLASH_COMMIT
	.word	AF_FLASHING
	.word	RS_SUCCESS
	.size	esas2r_complete_request, .-esas2r_complete_request
	.comm	VDA_FUNC_SCSI,4,4
	.comm	VDA_FUNC_FLASH,4,4
	.comm	VDA_FLASH_COMMIT,4,4
	.comm	RS_SUCCESS,4,4
	.comm	RS_PENDING,4,4
	.comm	AF_FLASHING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
