	.file	"extr_sd.c_sd_eh_action.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Medium access timeout failure. Offlining disk!\n"
	.text
	.p2align 4
	.type	sd_eh_action, @function
sd_eh_action:
.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
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR [rax]
	call	scsi_disk@PLT
	mov	r12, QWORD PTR 8[rbp]
	mov	r13, rax
	mov	rdi, r12
	call	scsi_device_online@PLT
	test	eax, eax
	jne	.L2
.L4:
	mov	eax, ebx
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	scsi_medium_access_command@PLT
	test	eax, eax
	je	.L4
	mov	edi, DWORD PTR 0[rbp]
	call	host_byte@PLT
	cmp	rax, QWORD PTR DID_TIME_OUT[rip]
	jne	.L4
	cmp	DWORD PTR SUCCESS[rip], ebx
	jne	.L4
	mov	edx, DWORD PTR 0[r13]
	mov	rax, QWORD PTR 8[r13]
	test	edx, edx
	jne	.L5
	add	rax, 1
	mov	DWORD PTR 0[r13], 1
	mov	QWORD PTR 8[r13], rax
.L5:
	cmp	QWORD PTR 16[r13], rax
	jg	.L4
	mov	edi, DWORD PTR KERN_ERR[rip]
	lea	rdx, .LC0[rip]
	mov	rsi, rbp
	call	scmd_printk@PLT
	mov	rdi, r12
	call	mutex_lock@PLT
	mov	esi, DWORD PTR SDEV_OFFLINE[rip]
	mov	rdi, r12
	call	scsi_device_set_state@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR SUCCESS[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sd_eh_action, .-sd_eh_action
	.comm	SUCCESS,4,4
	.comm	SDEV_OFFLINE,4,4
	.comm	KERN_ERR,4,4
	.comm	DID_TIME_OUT,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_sd.c_sd_eh_action.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Medium access timeout failure. Offlining disk!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_eh_action, %function
sd_eh_action:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #8]
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	ldr	r0, [r3]
	mov	r4, r1
	bl	scsi_disk
	ldr	r6, [r7, #4]
	mov	r5, r0
	mov	r0, r6
	bl	scsi_device_online
	cmp	r0, #0
	bne	.L2
.L4:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r7
	bl	scsi_medium_access_command
	cmp	r0, #0
	beq	.L4
	ldr	r0, [r7]
	bl	host_byte
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L4
	ldr	r8, .L11+4
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L4
	ldm	r5, {r2, r3}
	cmp	r2, #0
	moveq	r2, #1
	addeq	r3, r3, r2
	stmeq	r5, {r2, r3}
	ldr	r2, [r5, #8]
	cmp	r2, r3
	bgt	.L4
	ldr	r3, .L11+8
	ldr	r2, .L11+12
	mov	r1, r7
	ldr	r0, [r3]
	bl	scmd_printk
	mov	r0, r6
	bl	mutex_lock
	ldr	r3, .L11+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	scsi_device_set_state
	mov	r0, r6
	bl	mutex_unlock
	ldr	r0, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	DID_TIME_OUT
	.word	SUCCESS
	.word	KERN_ERR
	.word	.LC0
	.word	SDEV_OFFLINE
	.size	sd_eh_action, .-sd_eh_action
	.comm	SUCCESS,4,4
	.comm	SDEV_OFFLINE,4,4
	.comm	KERN_ERR,4,4
	.comm	DID_TIME_OUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
