	.file	"extr_ide-io.c_ide_kill_rq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ide_kill_rq
	.type	ide_kill_rq, @function
ide_kill_rq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	mov	rdi, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	ata_misc_request@PLT
	mov	rdx, QWORD PTR ide_floppy[rip]
	test	rax, rax
	mov	rax, QWORD PTR [r12]
	je	.L4
	cmp	QWORD PTR 0[rbp], 0
	je	.L4
	mov	QWORD PTR 8[r12], 0
	cmp	rdx, rax
	je	.L5
	cmp	QWORD PTR ide_tape[rip], rax
	je	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	call	blk_rq_is_passthrough@PLT
	test	rax, rax
	jne	.L19
.L8:
	mov	rdi, rbp
	call	blk_rq_bytes@PLT
	mov	esi, DWORD PTR BLK_STS_IOERR[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	edx, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ide_complete_rq@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	QWORD PTR 8[r12], 0
	mov	rcx, QWORD PTR ide_tape[rip]
	cmp	rax, rcx
	jne	.L6
	mov	rdi, rbp
	call	scsi_req@PLT
	mov	edx, DWORD PTR IDE_DRV_ERROR_GENERAL[rip]
	mov	DWORD PTR [rax], edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbp
	call	scsi_req@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L8
	mov	ebx, DWORD PTR EIO[rip]
	mov	rdi, rbp
	call	scsi_req@PLT
	neg	ebx
	mov	DWORD PTR [rax], ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	call	scsi_req@PLT
	mov	DWORD PTR [rax], 0
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	ide_kill_rq, .-ide_kill_rq
	.comm	ide_tape,8,8
	.comm	ide_floppy,8,8
	.comm	IDE_DRV_ERROR_GENERAL,4,4
	.comm	EIO,4,4
	.comm	BLK_STS_IOERR,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_ide-io.c_ide_kill_rq.c"
	.text
	.align	2
	.global	ide_kill_rq
	.syntax unified
	.arm
	.fpu softvfp
	.type	ide_kill_rq, %function
ide_kill_rq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	mov	r0, r1
	mov	r4, r1
	bl	ata_misc_request
	cmp	r0, #0
	beq	.L2
	ldr	r2, [r4]
	ldr	r3, .L20
	cmp	r2, #0
	ldr	r2, [r3]
	ldr	r3, [r5]
	beq	.L4
	mov	r1, #0
	cmp	r2, r3
	str	r1, [r5, #4]
	beq	.L5
	ldr	r2, .L20+4
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L5
.L6:
	mov	r0, r4
	bl	blk_rq_is_passthrough
	cmp	r0, #0
	bne	.L19
.L8:
	ldr	r3, .L20+8
	mov	r0, r4
	ldr	r4, [r3]
	bl	blk_rq_bytes
	mov	r1, r4
	mov	r2, r0
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	ide_complete_rq
.L2:
	ldr	r3, [r5]
.L4:
	mov	r0, #0
	ldr	r1, .L20+4
	str	r0, [r5, #4]
	ldr	r2, [r1]
	cmp	r3, r2
	bne	.L6
	mov	r0, r4
	bl	scsi_req
	ldr	r3, .L20+12
	ldr	r3, [r3]
	str	r3, [r0]
	b	.L8
.L19:
	mov	r0, r4
	bl	scsi_req
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L20+16
	mov	r0, r4
	ldr	r6, [r3]
	bl	scsi_req
	rsb	r6, r6, #0
	str	r6, [r0]
	b	.L8
.L5:
	mov	r0, r4
	bl	scsi_req
	mov	r3, #0
	str	r3, [r0]
	b	.L8
.L21:
	.align	2
.L20:
	.word	ide_floppy
	.word	ide_tape
	.word	BLK_STS_IOERR
	.word	IDE_DRV_ERROR_GENERAL
	.word	EIO
	.size	ide_kill_rq, .-ide_kill_rq
	.comm	ide_tape,4,4
	.comm	ide_floppy,4,4
	.comm	IDE_DRV_ERROR_GENERAL,4,4
	.comm	EIO,4,4
	.comm	BLK_STS_IOERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
